Add mutex for monitor socket

This commit is contained in:
Jens Auer
2016-10-11 13:28:45 +00:00
parent 23be1dc0ec
commit d1c7280d05
2 changed files with 53 additions and 31 deletions

View File

@@ -176,16 +176,20 @@ namespace zmq
// Delay actual destruction of the socket.
void process_destroy ();
// Next assigned name on a zmq_connect() call used by ROUTER and STREAM socket types
std::string connect_rid;
private:
// test if event should be sent and then dispatch it
void event(const std::string &addr_, int fd_, int type_);
// Socket event data dispatch
void monitor_event (int event_, intptr_t value_, const std::string& addr_);
// Monitor socket cleanup
void stop_monitor (bool send_monitor_stopped_event_ = true);
// Next assigned name on a zmq_connect() call used by ROUTER and STREAM socket types
std::string connect_rid;
private:
// Creates new endpoint ID and adds the endpoint to the map.
void add_endpoint (const char *addr_, own_t *endpoint_, pipe_t *pipe);
@@ -282,6 +286,9 @@ namespace zmq
// Mutex for synchronize access to the socket in thread safe mode
mutex_t sync;
// Mutex to synchronize access to the monitor Pair socket
mutex_t monitor_sync;
socket_base_t (const socket_base_t&);
const socket_base_t &operator = (const socket_base_t&);
};