aboutsummaryrefslogtreecommitdiffstats
path: root/vbench/src/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-02-15 13:10:31 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-02-15 15:27:19 +0000
commit070fc34cee07db023824c76995bba43f2262d6c1 (patch)
treef30d42ff4c97cafcb3dd64e025c7f687366784c4 /vbench/src/tests
parent5780a48616db40c6eb5ae12293b115fbbc44b080 (diff)
use std::thread directly
also add very simple ThreadPool class to run multiple threads at once make an effort to only join once
Diffstat (limited to 'vbench/src/tests')
-rw-r--r--vbench/src/tests/dispatcher/dispatcher_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vbench/src/tests/dispatcher/dispatcher_test.cpp b/vbench/src/tests/dispatcher/dispatcher_test.cpp
index 6a3fb8d0c7c..49a41508c7b 100644
--- a/vbench/src/tests/dispatcher/dispatcher_test.cpp
+++ b/vbench/src/tests/dispatcher/dispatcher_test.cpp
@@ -30,9 +30,9 @@ TEST("dispatcher") {
Dispatcher<int> dispatcher(dropped);
Fetcher fetcher1(dispatcher, handler1);
Fetcher fetcher2(dispatcher, handler2);
- auto thread1 = vespalib::Thread::start(fetcher1, fetcher1_thread);
+ auto thread1 = vespalib::thread::start(fetcher1, fetcher1_thread);
EXPECT_TRUE(dispatcher.waitForThreads(1, 512));
- auto thread2 = vespalib::Thread::start(fetcher2, fetcher2_thread);
+ auto thread2 = vespalib::thread::start(fetcher2, fetcher2_thread);
EXPECT_TRUE(dispatcher.waitForThreads(2, 512));
EXPECT_EQUAL(-1, dropped.value);
EXPECT_EQUAL(-1, handler1.value);