mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-08 06:42:57 +01:00
Add mutex for monitor socket
This commit is contained in:
@@ -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&);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user