Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
6ed1f476
Commit
6ed1f476
authored
Nov 06, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #738 from ricnewton/master
Fix race condition on shutdown
parents
8797af77
844689ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
ctx.cpp
src/ctx.cpp
+1
-3
No files found.
src/ctx.cpp
View file @
6ed1f476
...
...
@@ -107,7 +107,6 @@ int zmq::ctx_t::terminate ()
// restarted.
bool
restarted
=
terminating
;
terminating
=
true
;
slot_sync
.
unlock
();
// First attempt to terminate the context.
if
(
!
restarted
)
{
...
...
@@ -115,13 +114,12 @@ int zmq::ctx_t::terminate ()
// First send stop command to sockets so that any blocking calls
// can be interrupted. If there are no sockets we can ask reaper
// thread to stop.
slot_sync
.
lock
();
for
(
sockets_t
::
size_type
i
=
0
;
i
!=
sockets
.
size
();
i
++
)
sockets
[
i
]
->
stop
();
if
(
sockets
.
empty
())
reaper
->
stop
();
slot_sync
.
unlock
();
}
slot_sync
.
unlock
();
// Wait till reaper thread closes all the sockets.
command_t
cmd
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment