zeromq / zeromq3-x

ØMQ/3.2 release branch - bug fixes only
GNU General Public License v3.0
227 stars 96 forks source link

Work around for LIBZMQ-496 #79

Closed mika-fischer closed 11 years ago

mika-fischer commented 11 years ago

The problem is that other threads might still be in mailbox::send() when it is destroyed. So as a workaround, we just acquire the mutex in the destructor. Therefore the running send will finish before the mailbox is destroyed.

See also the fix for LIBZMQ-281 in zeromq2-x.

Signed-off-by: Mika Fischer mika.fischer@zoopnet.de

hintjens commented 11 years ago

The usual flow for patches to 3-x is to fix them in master first and then we backport them to stable. Do you have a test case for this?

mika-fischer commented 11 years ago

The test case is in the bug report. I'll make a pull request against libzmq. Anything else I need to do to get it backported to 3.x?

mika-fischer commented 11 years ago

See https://github.com/zeromq/libzmq/pull/533

hintjens commented 11 years ago

This is fine :-) Could you double-check that 3-x now passes the test, then close the issue?

Thanks a lot for the fix!