summaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-12 09:26:11 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-11-12 09:26:11 +0000
commit434fca0b458910329f63da49b9b1c84de232bf3f (patch)
tree6060535c3c2b13e40b37867b21230fdbdc7c80ec /staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp
parentde23b574462e6931e6afd0906257f0bd7673f1f8 (diff)
Name the threads so it is easier to see who is doing what.
Diffstat (limited to 'staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp')
-rw-r--r--staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp b/staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp
index 622c9b9985f..5cc8862fc05 100644
--- a/staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp
+++ b/staging_vespalib/src/tests/singleexecutor/singleexecutor_test.cpp
@@ -8,10 +8,12 @@
using namespace vespalib;
+VESPA_THREAD_STACK_TAG(sequenced_executor)
+
TEST("test that all tasks are executed") {
std::atomic<uint64_t> counter(0);
- SingleExecutor executor(10);
+ SingleExecutor executor(sequenced_executor, 10);
for (uint64_t i(0); i < 10; i++) {
executor.execute(makeLambdaTask([&counter] {counter++;}));
@@ -32,7 +34,7 @@ void verifyResizeTaskLimit(bool up) {
std::condition_variable cond;
std::atomic<uint64_t> started(0);
std::atomic<uint64_t> allowed(0);
- SingleExecutor executor(10);
+ SingleExecutor executor(sequenced_executor, 10);
uint32_t targetTaskLimit = up ? 20 : 5;
uint32_t roundedTaskLimit = roundUp2inN(targetTaskLimit);