diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-08-12 15:03:51 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-08-25 15:39:20 +0200 |
commit | 45f83d78a56f4b3a812c87fec03a75558445b2ab (patch) | |
tree | 1adba1798c914baf65929d89ed9725dd68672bd6 /src/socket_base.hpp | |
parent | 936dbf956b0f1471a96fc06bcba67765257dbc4a (diff) |
one more dezombification bug fixed
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r-- | src/socket_base.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp index 785967e..1d8c4ff 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -85,8 +85,8 @@ namespace zmq void terminated (class writer_t *pipe_); // This function should be called only on zombie sockets. It tries - // to deallocate the zombie. - void dezombify (); + // to deallocate the zombie. Returns true is object is destroyed. + bool dezombify (); protected: @@ -120,6 +120,9 @@ namespace zmq // by overloading it. void process_term (); + // Delay actual destruction of the socket. + void process_destroy (); + private: // TODO: Check whether we still need this flag... @@ -128,6 +131,11 @@ namespace zmq // attached to the socket. bool zombie; + // If true, object should have been already destroyed. However, + // destruction is delayed while we unwind the stack to the point + // where it doesn't intersect the object being destroyed. + bool destroyed; + // Check whether transport protocol, as specified in connect or // bind, is available and compatible with the socket type. int check_protocol (const std::string &protocol_); |