aboutsummaryrefslogtreecommitdiff
path: root/test/test_queue.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-11-14 22:18:59 -0500
committerDeterminant <[email protected]>2018-11-14 22:18:59 -0500
commitecc163f98e434b557768560d00ee2f9755d6d950 (patch)
tree7cb9d04ba0dc4761968cd79de0c9be5aab3aa6e4 /test/test_queue.cpp
parent0f341fe7f092f704e1c1952c72085eb1ebd2086a (diff)
major bug fix
Diffstat (limited to 'test/test_queue.cpp')
-rw-r--r--test/test_queue.cpp5
1 files changed, 2 insertions, 3 deletions
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<std::thread> 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++)