aboutsummaryrefslogtreecommitdiffstats
path: root/searchcorespi
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-26 08:05:22 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-11-26 09:47:32 +0000
commita7d737bb813c4398ad226b893117093b6f72a148 (patch)
tree0ba44637a98970f6f21ba285561631a7e1a0486e /searchcorespi
parent1a9d505710061196383e649f0918cca7cd41a066 (diff)
Only expose sync for the master thread.
Diffstat (limited to 'searchcorespi')
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h5
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h b/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h
index b4e51e2dd1b..f973908b62d 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h
@@ -9,7 +9,7 @@ namespace searchcorespi::index {
/**
* Interface for a single thread used for write tasks.
*/
-struct IThreadService : public vespalib::SyncableThreadExecutor
+struct IThreadService : public vespalib::ThreadExecutor
{
IThreadService(const IThreadService &) = delete;
IThreadService & operator = (const IThreadService &) = delete;
@@ -25,6 +25,9 @@ struct IThreadService : public vespalib::SyncableThreadExecutor
* Returns whether the current thread is the underlying thread.
*/
virtual bool isCurrentThread() const = 0;
+};
+
+struct ISyncableThreadService : public IThreadService, vespalib::Syncable {
};
diff --git a/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h b/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h
index 72362688659..c95a42f601b 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h
@@ -69,7 +69,7 @@ struct IThreadingService
*/
virtual void blocking_master_execute(vespalib::Executor::Task::UP task) = 0;
- virtual IThreadService &master() = 0;
+ virtual ISyncableThreadService &master() = 0;
virtual IThreadService &index() = 0;
virtual vespalib::ThreadExecutor &summary() = 0;
virtual vespalib::ThreadExecutor &shared() = 0;