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
5224b870
Commit
5224b870
authored
Feb 14, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: race condition in unit test
Solution: fix order of statements in test_events_t
parent
487c2758
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
unittest_poller.cpp
unittests/unittest_poller.cpp
+6
-2
No files found.
unittests/unittest_poller.cpp
View file @
5224b870
...
...
@@ -63,9 +63,11 @@ struct test_events_t : zmq::i_poll_events
virtual
void
in_event
()
{
in_events
.
add
(
1
);
poller
.
rm_fd
(
handle
);
handle
=
(
zmq
::
poller_t
::
handle_t
)
NULL
;
// this must only be incremented after rm_fd
in_events
.
add
(
1
);
}
...
...
@@ -78,9 +80,11 @@ struct test_events_t : zmq::i_poll_events
virtual
void
timer_event
(
int
id_
)
{
LIBZMQ_UNUSED
(
id_
);
timer_events
.
add
(
1
);
poller
.
rm_fd
(
handle
);
handle
=
(
zmq
::
poller_t
::
handle_t
)
NULL
;
// this must only be incremented after rm_fd
timer_events
.
add
(
1
);
}
void
set_handle
(
zmq
::
poller_t
::
handle_t
handle_
)
{
handle
=
handle_
;
}
...
...
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