diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-08-25 14:44:30 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-08-25 14:44:30 +0000 |
commit | 9ab8b114aacb9e54cc3f8f33600c4adb1a2cc755 (patch) | |
tree | 4b9ce403a4a4dda9b10ab902aae418c498b1e4ed /searchcorespi/src | |
parent | 27444d9fb3334411c033a135f7e9dffccb2087e7 (diff) |
Split ThreadExecutor in syncable and not.
Diffstat (limited to 'searchcorespi/src')
6 files changed, 21 insertions, 21 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h b/searchcorespi/src/vespa/searchcorespi/index/i_thread_service.h index 40d92010c9b..65f18ac2c79 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::ThreadExecutor +struct IThreadService : public vespalib::SyncableThreadExecutor { IThreadService(const IThreadService &) = delete; IThreadService & operator = (const IThreadService &) = delete; diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.cpp index 213d2cb8705..78b9930c69a 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.cpp @@ -11,7 +11,7 @@ namespace searchcorespi::index { IndexMaintainerContext::IndexMaintainerContext(IThreadingService &threadingService, IIndexManager::Reconfigurer &reconfigurer, const FileHeaderContext &fileHeaderContext, - vespalib::ThreadExecutor & warmupExecutor) + vespalib::SyncableThreadExecutor & warmupExecutor) : _threadingService(threadingService), _reconfigurer(reconfigurer), _fileHeaderContext(fileHeaderContext), diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.h index 972a16effc3..ab4a447168e 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainercontext.h @@ -15,15 +15,15 @@ namespace searchcorespi::index { class IndexMaintainerContext { private: IThreadingService &_threadingService; - searchcorespi::IIndexManager::Reconfigurer &_reconfigurer; + IIndexManager::Reconfigurer &_reconfigurer; const search::common::FileHeaderContext &_fileHeaderContext; - vespalib::ThreadExecutor & _warmupExecutor; + vespalib::SyncableThreadExecutor & _warmupExecutor; public: IndexMaintainerContext(IThreadingService &threadingService, - searchcorespi::IIndexManager::Reconfigurer &reconfigurer, + IIndexManager::Reconfigurer &reconfigurer, const search::common::FileHeaderContext &fileHeaderContext, - vespalib::ThreadExecutor & warmupExecutor); + vespalib::SyncableThreadExecutor & warmupExecutor); /** * Returns the treading service that encapsulates the thread model used for writing. @@ -35,7 +35,7 @@ public: /** * Returns the reconfigurer used to signal when the index maintainer has changed. */ - searchcorespi::IIndexManager::Reconfigurer &getReconfigurer() const { + IIndexManager::Reconfigurer &getReconfigurer() const { return _reconfigurer; } @@ -49,7 +49,7 @@ public: /** * @return The executor that should be used for warmup. */ - vespalib::ThreadExecutor & getWarmupExecutor() const { return _warmupExecutor; } + vespalib::SyncableThreadExecutor & getWarmupExecutor() const { return _warmupExecutor; } }; } diff --git a/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h b/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h index eb80eff19ac..a8526a13b0b 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h +++ b/searchcorespi/src/vespa/searchcorespi/index/ithreadingservice.h @@ -54,7 +54,7 @@ struct IThreadingService : public vespalib::Syncable virtual IThreadService &master() = 0; virtual IThreadService &index() = 0; virtual IThreadService &summary() = 0; - virtual vespalib::ThreadExecutor &shared() = 0; + virtual vespalib::SyncableThreadExecutor &shared() = 0; // Note this should only supply a ThreadExecutor virtual search::ISequencedTaskExecutor &indexFieldInverter() = 0; virtual search::ISequencedTaskExecutor &indexFieldWriter() = 0; virtual search::ISequencedTaskExecutor &attributeFieldWriter() = 0; diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp index 911ff5f9eba..1786665c248 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp @@ -34,7 +34,7 @@ WarmupIndexCollection::WarmupIndexCollection(const WarmupConfig & warmupConfig, ISearchableIndexCollection::SP prev, ISearchableIndexCollection::SP next, IndexSearchable & warmup, - vespalib::ThreadExecutor & executor, + vespalib::SyncableThreadExecutor & executor, IWarmupDone & warmupDone) : _warmupConfig(warmupConfig), _prev(prev), diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h index 229d1a7c31d..992cedb1057 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h +++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h @@ -30,9 +30,9 @@ public: ISearchableIndexCollection::SP prev, ISearchableIndexCollection::SP next, IndexSearchable & warmup, - vespalib::ThreadExecutor & executor, + vespalib::SyncableThreadExecutor & executor, IWarmupDone & warmupDone); - ~WarmupIndexCollection(); + ~WarmupIndexCollection() override; // Implements IIndexCollection const ISourceSelector &getSourceSelector() const override; size_t getSourceCount() const override; @@ -95,15 +95,15 @@ private: void fireWarmup(Task::UP task); bool handledBefore(uint32_t fieldId, const Node &term); - const WarmupConfig _warmupConfig; - ISearchableIndexCollection::SP _prev; - ISearchableIndexCollection::SP _next; - IndexSearchable & _warmup; - vespalib::ThreadExecutor & _executor; - IWarmupDone & _warmupDone; - fastos::TimeStamp _warmupEndTime; - std::mutex _lock; - std::unique_ptr<FieldTermMap> _handledTerms; + const WarmupConfig _warmupConfig; + ISearchableIndexCollection::SP _prev; + ISearchableIndexCollection::SP _next; + IndexSearchable & _warmup; + vespalib::SyncableThreadExecutor & _executor; + IWarmupDone & _warmupDone; + fastos::TimeStamp _warmupEndTime; + std::mutex _lock; + std::unique_ptr<FieldTermMap> _handledTerms; }; } // namespace searchcorespi |