summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-19 21:40:26 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-19 21:40:26 +0200
commit938689a49128ca17d2bc9662f311c6dbb70240db (patch)
treed709fdb4b0fb2c7b8fcb22f58e53c7f7d9eb16af /src/ctx.cpp
parent471013a59fc7f41b694c0bc0b11a459d4c19700d (diff)
synchronisation problem fixed in ctx_t
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp2
1 files changed, 2 insertions, 0 deletions
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 ();