summaryrefslogtreecommitdiff
path: root/src/object.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-09 15:32:15 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-09 15:32:15 +0100
commit80ac398bba928fa7f245d2e107071677a13185cf (patch)
tree57c51a7adb5f4cb1a91396fe0b223538a4d428d7 /src/object.hpp
parent889424e675eecd9d9c7d1121456401d5c43029a5 (diff)
Initial implementation of reaper thread.
Reaper thread destroys the socket asynchronously. zmq_term() can be interrupted by a signal (EINTR). zmq_socket() will return ETERM after zmq_term() was called. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/object.hpp')
-rw-r--r--src/object.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object.hpp b/src/object.hpp
index 0fd6f47..cee82c8 100644
--- a/src/object.hpp
+++ b/src/object.hpp
@@ -49,6 +49,7 @@ namespace zmq
int register_endpoint (const char *addr_, struct endpoint_t &endpoint_);
void unregister_endpoints (class socket_base_t *socket_);
struct endpoint_t find_endpoint (const char *addr_);
+ void destroy_socket (class socket_base_t *socket_);
// Logs an message.
void log (zmq_msg_t *msg_);
@@ -56,10 +57,6 @@ namespace zmq
// Chooses least loaded I/O thread.
class io_thread_t *choose_io_thread (uint64_t affinity_);
- // Zombify particular socket. In other words, pass the ownership to
- // the context.
- void zombify_socket (class socket_base_t *socket_);
-
// Derived object can use these functions to send commands
// to other objects.
void send_stop ();
@@ -82,6 +79,8 @@ namespace zmq
class own_t *object_);
void send_term (class own_t *destination_, int linger_);
void send_term_ack (class own_t *destination_);
+ void send_reap (class socket_base_t *socket_);
+ void send_done ();
// These handlers can be overloaded by the derived objects. They are
// called when command arrives from another thread.
@@ -99,6 +98,7 @@ namespace zmq
virtual void process_term_req (class own_t *object_);
virtual void process_term (int linger_);
virtual void process_term_ack ();
+ virtual void process_reap (class socket_base_t *socket_);
// Special handler called after a command that requires a seqnum
// was processed. The implementation should catch up with its counter