From 938689a49128ca17d2bc9662f311c6dbb70240db Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 19 Sep 2010 21:40:26 +0200 Subject: synchronisation problem fixed in ctx_t --- src/ctx.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ctx.cpp') diff --git a/src/ctx.cpp b/src/ctx.cpp index 267f7d0..b17fac0 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -108,8 +108,10 @@ int zmq::ctx_t::terminate () { // First send stop command to sockets so that any // blocking calls are interrupted. + slot_sync.lock (); for (sockets_t::size_type i = 0; i != sockets.size (); i++) sockets [i]->stop (); + slot_sync.unlock (); // Close the logging infrastructure. log_sync.lock (); -- cgit v1.2.3