From ecc163f98e434b557768560d00ee2f9755d6d950 Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 14 Nov 2018 22:18:59 -0500 Subject: major bug fix --- test/test_queue.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/test_queue.cpp') diff --git a/test/test_queue.cpp b/test/test_queue.cpp index a2444d3..5a7b548 100644 --- a/test/test_queue.cpp +++ b/test/test_queue.cpp @@ -23,11 +23,10 @@ void test_mpsc(int nproducers = 16, int nops = 100000, size_t burst_size = 128) }); std::vector producers; std::thread consumer([&collected, total, &ec]() { - salticidae::Event timer(ec, -1, EV_TIMEOUT | EV_PERSIST, - [&ec, &collected, total](int, short) { + salticidae::Event timer(ec, -1, [&ec, &collected, total](int, short) { if (collected.load() == total) ec.stop(); }); - timer.add_with_timeout(1); + timer.add_with_timeout(1, EV_TIMEOUT | EV_PERSIST); ec.dispatch(); }); for (int i = 0; i < nproducers; i++) -- cgit v1.2.3