summaryrefslogtreecommitdiff
path: root/src/mailbox.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 09:00:28 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 09:00:28 +0100
commit4016b657973bba87caf75168ba70aaa85d556487 (patch)
treec2abaf9284f55964bea72a0b76f6b79070335858 /src/mailbox.cpp
parent978e33ba253a997b41b331b449b474a5cee7bccc (diff)
Imported Upstream version 2.1.11upstream/2.1.11
Diffstat (limited to 'src/mailbox.cpp')
-rw-r--r--src/mailbox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mailbox.cpp b/src/mailbox.cpp
index a99a9ec..24fa739 100644
--- a/src/mailbox.cpp
+++ b/src/mailbox.cpp
@@ -35,6 +35,11 @@ zmq::mailbox_t::mailbox_t ()
zmq::mailbox_t::~mailbox_t ()
{
// TODO: Retrieve and deallocate commands inside the cpipe.
+
+ // Work around problem that other threads might still be in our
+ // send() method, by waiting on the mutex before disappearing.
+ sync.lock ();
+ sync.unlock ();
}
zmq::fd_t zmq::mailbox_t::get_fd ()