From 4016b657973bba87caf75168ba70aaa85d556487 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 09:00:28 +0100 Subject: Imported Upstream version 2.1.11 --- src/mailbox.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mailbox.cpp') 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 () -- cgit v1.2.3