summaryrefslogtreecommitdiff
path: root/src/mailbox.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
commitba0336b4d129a9e261c95276f89640b3459176bf (patch)
treea488f7efb61a6950a462815062c3b0f007f40ff5 /src/mailbox.cpp
parentc3363afa881b46f3df8a6b72ed15cfbac18f4713 (diff)
parent4016b657973bba87caf75168ba70aaa85d556487 (diff)
Merge commit 'upstream/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 ()