diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-16 11:19:21 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-16 11:20:06 +0000 |
commit | 0447c0fdb822ddf603235836b30068337605a723 (patch) | |
tree | ef6a7b07caa082eec89efa5d3a6d048fde75966a /vespalib | |
parent | dcf41da1482b5f359ebce7f6395e00017199ca1d (diff) |
GC convenience constructor to be explicit.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/singleexecutor/singleexecutor_test.cpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/singleexecutor.cpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/singleexecutor.h | 1 |
3 files changed, 1 insertions, 6 deletions
diff --git a/vespalib/src/tests/singleexecutor/singleexecutor_test.cpp b/vespalib/src/tests/singleexecutor/singleexecutor_test.cpp index 3b1d244eb13..23b2dd19a85 100644 --- a/vespalib/src/tests/singleexecutor/singleexecutor_test.cpp +++ b/vespalib/src/tests/singleexecutor/singleexecutor_test.cpp @@ -15,7 +15,7 @@ VESPA_THREAD_STACK_TAG(sequenced_executor) TEST("test that all tasks are executed") { std::atomic<uint64_t> counter(0); - SingleExecutor executor(sequenced_executor, 10); + SingleExecutor executor(sequenced_executor, 10, true, 1, 100ms); for (uint64_t i(0); i < 10; i++) { executor.execute(makeLambdaTask([&counter] {counter++;})); diff --git a/vespalib/src/vespa/vespalib/util/singleexecutor.cpp b/vespalib/src/vespa/vespalib/util/singleexecutor.cpp index fa1aef61167..533fd293f71 100644 --- a/vespalib/src/vespa/vespalib/util/singleexecutor.cpp +++ b/vespalib/src/vespa/vespalib/util/singleexecutor.cpp @@ -6,10 +6,6 @@ namespace vespalib { -SingleExecutor::SingleExecutor(init_fun_t func, uint32_t taskLimit) - : SingleExecutor(func, taskLimit, true, taskLimit/10, 100ms) -{ } - SingleExecutor::SingleExecutor(init_fun_t func, uint32_t reservedQueueSize, bool isQueueSizeHard, uint32_t watermark, duration reactionTime) : _watermarkRatio(watermark < reservedQueueSize ? double(watermark) / reservedQueueSize : 1.0), _taskLimit(vespalib::roundUp2inN(reservedQueueSize)), diff --git a/vespalib/src/vespa/vespalib/util/singleexecutor.h b/vespalib/src/vespa/vespalib/util/singleexecutor.h index e8b7b0c44ad..975202aa38b 100644 --- a/vespalib/src/vespa/vespalib/util/singleexecutor.h +++ b/vespalib/src/vespa/vespalib/util/singleexecutor.h @@ -22,7 +22,6 @@ namespace vespalib { */ class SingleExecutor final : public vespalib::SyncableThreadExecutor, vespalib::Runnable { public: - SingleExecutor(init_fun_t func, uint32_t reservedQueueSize); SingleExecutor(init_fun_t func, uint32_t reservedQueueSize, bool isQueueSizeHard, uint32_t watermark, duration reactionTime); ~SingleExecutor() override; Task::UP execute(Task::UP task) override; |