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_;
ThreadPoolSettings & size(UInt32 value)
Defines the number of working threads in the pool.
TinySet< CpuIndex > CpuIndices
Alias for collection of CPU indices.
A pool of threads executing feed engine tasks.
ThreadAffinity(const ThreadAffinity &other)
Initializes as a copy of the other set.
#define ONIXS_CMEMDH_NULLPTR
const CpuIndices & cpus() const
Read-only access to the indices.
virtual void onFeedEngineThreadEnd(const FeedEngineThreadPool &)
Invoked by the thread when it is about to end.
ThreadAffinity & affinity()
Defines set of CPUs allowed for each working thread to be executed on while running tasks...
Current thread related tasks.
Int32 CpuIndex
Zero-based index of CPU.
virtual void onFeedEngineThreadIssue(const FeedEngineThreadPool &, const Char *)
Invoked when the thread experiences an issue while processing its tasks.
The collection of parameters affecting behavior of a Feed Engine thread pool.
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_LTWT
ThreadPoolSettings & pool()
Settings related to the thread pool.
Abstraction for the Feed Engine machinery.
Represents a set of CPU indices.
~ThreadPoolSettings()
Cleans everything up.
ThreadAffinity()
Initializes the empty set.
char Char
Character type alias.
bool value(Number &number, const MultiContainer &container, Tag tag)
Finds a tag-value entry in the given collection by the given tag and returns its value component tran...
FeedEngineThreadSettings()
Assigns the default values for the given instance of the thread pool settings.
const ThreadPoolSettings & pool() const
Settings related to the thread pool.
ThreadPoolSettings()
Assigns the default values for the given instance of the thread pool settings.
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
std::string toStr(const FeedEngineThreadSettings &settings)
Serializes settings defining behavior of feed engine threads into a string.
UInt32 size() const
Number of working threads in the pool.
#define ONIXS_CMEMDH_EXPORTED
const ThreadAffinity & affinity() const
Defines set of CPUs allowed for each working thread to be executed on while running tasks...
CpuIndices & cpus()
Collection of the CPU indices.
The collection of parameters affecting behavior of a thread pool.
Listener for thread-related events.
virtual void onFeedEngineThreadBegin(const FeedEngineThreadPool &)
Invoked by the thread before entering the processing loop.
UInt32 loopBeforeIdle() const
Defines amount of cycles a working thread keeps cycling before entering the idle state if no useful a...
virtual bool onFeedEngineThreadIdle(const FeedEngineThreadPool &)
Invoked when the thread is idle.
~ThreadAffinity()
Utilizes internal resources.
void loopBeforeIdle(UInt32 value)
Updates amount of cycles a working thread keeps cycling before entering the idle state if no useful a...
#define ONIXS_CMEMDH_NAMESPACE_END