Unverified Commit 08d94d0e authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #3877 from gummif/gfa/spinlock-fix

Problem: Spinning on atomics can cause hangs
parents 2745ac31 ff800899
......@@ -103,6 +103,7 @@ void wait_in_events (test_events_t &events_)
{
void *watch = zmq_stopwatch_start ();
while (events_.in_events.get () < 1) {
msleep (1);
#ifdef ZMQ_BUILD_DRAFT
TEST_ASSERT_LESS_OR_EQUAL_MESSAGE (SETTLE_TIME,
zmq_stopwatch_intermediate (watch),
......@@ -116,6 +117,7 @@ void wait_timer_events (test_events_t &events_)
{
void *watch = zmq_stopwatch_start ();
while (events_.timer_events.get () < 1) {
msleep (1);
#ifdef ZMQ_BUILD_DRAFT
TEST_ASSERT_LESS_OR_EQUAL_MESSAGE (SETTLE_TIME,
zmq_stopwatch_intermediate (watch),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment