summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-02-14 10:15:12 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-02-14 15:40:46 +0000
commit98e408c667e3dcda3dc177594ffa4c4d0d99a33e (patch)
tree8086fedd3c4c11ac51fa86f12f68cfe61095ee55 /config
parent251bd6d0b21aa2ddac8ef82338f40d37ffc4990f (diff)
stop using fastos thread more places
- also stop using std::jthread - remove Active and Joinable interfaces - remove stop, stopped and slumber - remove currentThread - make start function static - override start for Runnable w/init or custom function - explicit stop/slumber where needed
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/helper/configfetcher.cpp4
-rw-r--r--config/src/vespa/config/retriever/simpleconfigurer.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/config/src/vespa/config/helper/configfetcher.cpp b/config/src/vespa/config/helper/configfetcher.cpp
index b2cf6e1955d..ec4ea42d0bb 100644
--- a/config/src/vespa/config/helper/configfetcher.cpp
+++ b/config/src/vespa/config/helper/configfetcher.cpp
@@ -15,7 +15,7 @@ VESPA_THREAD_STACK_TAG(config_fetcher_thread);
ConfigFetcher::ConfigFetcher(std::shared_ptr<IConfigContext> context)
: _poller(std::make_unique<ConfigPoller>(std::move(context))),
- _thread(std::make_unique<vespalib::Thread>(*_poller, config_fetcher_thread)),
+ _thread(std::make_unique<vespalib::Thread>()),
_closed(false),
_started(false)
{
@@ -36,7 +36,7 @@ ConfigFetcher::start()
throw ConfigTimeoutException("ConfigFetcher::start timed out getting initial config");
}
LOG(debug, "Starting fetcher thread...");
- _thread->start();
+ *_thread = vespalib::Thread::start(*_poller, config_fetcher_thread);
_started = true;
LOG(debug, "Fetcher thread started");
}
diff --git a/config/src/vespa/config/retriever/simpleconfigurer.cpp b/config/src/vespa/config/retriever/simpleconfigurer.cpp
index 5059b9997f5..1e89f51ec03 100644
--- a/config/src/vespa/config/retriever/simpleconfigurer.cpp
+++ b/config/src/vespa/config/retriever/simpleconfigurer.cpp
@@ -13,7 +13,7 @@ VESPA_THREAD_STACK_TAG(simple_configurer_thread);
SimpleConfigurer::SimpleConfigurer(SimpleConfigRetriever::UP retriever, SimpleConfigurable * const configurable)
: _retriever(std::move(retriever)),
_configurable(configurable),
- _thread(*this, simple_configurer_thread),
+ _thread(),
_started(false)
{
assert(_retriever);
@@ -25,7 +25,7 @@ SimpleConfigurer::start()
if (!_retriever->isClosed()) {
LOG(debug, "Polling for config");
runConfigure();
- _thread.start();
+ _thread = vespalib::Thread::start(*this, simple_configurer_thread);
_started = true;
}
}