summaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-28 21:10:38 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-28 21:10:38 +0000
commita46a98bc7fd21a076470c06d560f42b5c7862b88 (patch)
treecaa66ecd38300065473412aa8ea5dc3cd1926402 /searchcore/src
parent4fa7d094dfba8affcf7a557ced76cc8ef74004cd (diff)
Add a simple adjustTimeoutByDetectedHz to compute a suitable timeout/naptime based on base VESPA_TIMER_HZ to use for random waiting
when doing a poll based appraoch.
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/shared_threading_service.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/shared_threading_service.cpp b/searchcore/src/vespa/searchcore/proton/server/shared_threading_service.cpp
index 1f06b29518b..b36dce23e28 100644
--- a/searchcore/src/vespa/searchcore/proton/server/shared_threading_service.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/shared_threading_service.cpp
@@ -26,7 +26,7 @@ SharedThreadingService::SharedThreadingService(const SharedThreadingServiceConfi
_shared(std::make_shared<vespalib::BlockingThreadStackExecutor>(cfg.shared_threads(), 128_Ki,
cfg.shared_task_limit(), proton_shared_executor)),
_field_writer(),
- _invokeService(std::max(vespalib::from_s(1.0/vespalib::getVespaTimerHz()),
+ _invokeService(std::max(vespalib::adjustTimeoutByDetectedHz(1ms),
cfg.field_writer_config().reactionTime())),
_invokeRegistrations()
{