aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/thread/thread_test.cpp
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-02-24 12:09:45 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-02-24 12:12:28 +0000
commita907c35031c5a09fb2fc76080f273ff95e663e65 (patch)
treed02425c63c06865cea237086897f53b39b2956fb /vespalib/src/tests/thread/thread_test.cpp
parentea34220e4bc8a9d9bc598cab098e2af893688e4a (diff)
avoid using fastos thread in storage
Diffstat (limited to 'vespalib/src/tests/thread/thread_test.cpp')
-rw-r--r--vespalib/src/tests/thread/thread_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/vespalib/src/tests/thread/thread_test.cpp b/vespalib/src/tests/thread/thread_test.cpp
index cde8a3596bf..077b85ea1ac 100644
--- a/vespalib/src/tests/thread/thread_test.cpp
+++ b/vespalib/src/tests/thread/thread_test.cpp
@@ -50,9 +50,17 @@ TEST("use thread pool to run multiple things") {
bool init_called = false;
bool was_run = false;
ThreadPool pool;
+ EXPECT_TRUE(pool.empty());
+ EXPECT_EQUAL(pool.size(), 0u);
pool.start(my_fun, &was_run);
+ EXPECT_TRUE(!pool.empty());
+ EXPECT_EQUAL(pool.size(), 1u);
pool.start(agent, wrap(test_agent_thread, &init_called));
+ EXPECT_TRUE(!pool.empty());
+ EXPECT_EQUAL(pool.size(), 2u);
pool.join();
+ EXPECT_TRUE(pool.empty());
+ EXPECT_EQUAL(pool.size(), 0u);
EXPECT_TRUE(init_called);
EXPECT_TRUE(agent.was_run);
EXPECT_TRUE(was_run);