78 : indices_(other.indices_)
88 return indices_.empty();
116 toStr(str, affinity);
189 toStr(str, settings);
230 return loopBeforeIdle_;
240 loopBeforeIdle_ = value;
259 toStr(str, settings);
279 Workhorse* workhorse_;
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_NULLPTR
#define ONIXS_CMEMDH_EXPORTED
A pool of threads executing feed engine tasks.
~FeedEngineThreadPool()
Stops all tasks and destructs the working threads.
FeedEngineThreadPool(NetFeedEngine &, const FeedEngineThreadSettings &, FeedEngineThreadPoolListener *=nullptr)
Initializes working threads and spawns feed engine process() routine invocation.
The collection of parameters affecting behavior of a Feed Engine thread pool.
const ThreadPoolSettings & pool() const
Settings related to the thread pool.
ThreadPoolSettings & pool()
Settings related to the thread pool.
void loopBeforeIdle(UInt32 value)
Updates amount of cycles a working thread keeps cycling before entering the idle state if no useful a...
UInt32 loopBeforeIdle() const
Defines amount of cycles a working thread keeps cycling before entering the idle state if no useful a...
FeedEngineThreadSettings()
Assigns the default values for the given instance of the thread pool settings.
Abstraction for the Feed Engine machinery.
Current thread related tasks.
static void affinity(CpuIndex)
static void affinity(const ThreadAffinity &)
Sets the processor affinity mask for the current thread.
Represents a set of CPU indices.
ThreadAffinity()
Initializes the empty set.
~ThreadAffinity()
Utilizes internal resources.
ThreadAffinity(const ThreadAffinity &other)
Initializes as a copy of the other set.
CpuIndices & cpus()
Collection of the CPU indices.
const CpuIndices & cpus() const
Read-only access to the indices.
The collection of parameters affecting behavior of a thread pool.
UInt32 size() const
Number of working threads in the pool.
const ThreadAffinity & affinity() const
Defines set of CPUs allowed for each working thread to be executed on while running tasks.
ThreadAffinity & affinity()
Defines set of CPUs allowed for each working thread to be executed on while running tasks.
~ThreadPoolSettings()
Cleans everything up.
ThreadPoolSettings & size(UInt32 value)
Defines the number of working threads in the pool.
ThreadPoolSettings()
Assigns the default values for the given instance of the thread pool settings.
Class implementing set optimized for storing small number of items.
char Char
Character type alias.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
TinySet< CpuIndex > CpuIndices
Alias for collection of CPU indices.
Int32 CpuIndex
Zero-based index of CPU.
Listener for thread-related events.
virtual void onFeedEngineThreadBegin(const FeedEngineThreadPool &)
Invoked by the thread before entering the processing loop.
virtual bool onFeedEngineThreadIdle(const FeedEngineThreadPool &)
Invoked when the thread is idle.
virtual void onFeedEngineThreadIssue(const FeedEngineThreadPool &, const Char *)
Invoked when the thread experiences an issue while processing its tasks.
virtual void onFeedEngineThreadEnd(const FeedEngineThreadPool &)
Invoked by the thread when it is about to end.