// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include #include namespace search { class AttributeVector; } namespace proton { struct IAttributeManager; /* * Class for executing task in attribute vector write thread. */ class AttributeExecutor { private: std::shared_ptr _mgr; std::shared_ptr _attr; public: AttributeExecutor(std::shared_ptr mgr, std::shared_ptr attr); ~AttributeExecutor(); void run_sync(std::function task) const; const search::AttributeVector& get_attr() const noexcept { return *_attr; } }; } // namespace proton