52 return 0 != value_.bits_.eventsDispatched_;
58 value_.bits_.eventsDispatched_ = state ? 1 : 0;
64 return 0 != value_.bits_.ioWaited_;
70 value_.bits_.ioWaited_ = state ? 1 : 0;
76 return value_.bits_.reserved_;
82 value_.bits_.reserved_ = flags;
88 Flags eventsDispatched_ : 1;
188 typedef std::set<CpuIndex> CpuIndexes;
223 CpuIndexes* indices_;
247 , spinBeforeIdleTime_(1)
261 return threadAffinity_;
273 return threadAffinity_;
287 threadCount_ = value;
300 return spinBeforeIdleTime_;
306 spinBeforeIdleTime_ = value;
311 UInt32 spinBeforeIdleTime_;
315 class ONIXS_EUREX_EMDI_API FeedEngineThreadPool;
364 class FeedEngineThreadPoolImpl;
365 FeedEngineThreadPoolImpl* impl_;
~EfViFeedEngine() override
EfViFeedEngine(UInt32 receiveRingSize=4095, WatchService &watch=NicWatch::service())
A pool of threads executing feed engine tasks.
const FeedEngineThreadPoolSettings settings() const
FeedEngineThreadPool(const FeedEngineThreadPoolSettings &, FeedEngine *, FeedEngineThreadPoolListener *=nullptr)
The Feed Engine machinery.
std::string info()
Provides information about the actual implementation of the feed engine.
NetFeedEngineProcessResult process()
Designed to reflect various aspects of feed engine processing flow.
void reserved(Flags flags) noexcept
Reserved (unused) flags.
NetFeedEngineProcessResult(UInt32 flags) noexcept
void ioWaited(bool state) noexcept
Indicates whether processing had to sleep in kernel while checking data availability.
Flags reserved() const noexcept
Reserved (unused) flags.
bool ioWaited() const noexcept
Indicates whether processing had to sleep in kernel while checking data availability.
bool eventsDispatched() const noexcept
Indicates whether feed-related events like data reception or absence have been dispatched.
void eventsDispatched(bool state) noexcept
Indicates whether feed-related events like data reception or absence have been dispatched.
UInt32 Flags
Aliases integral type whose bits are used to indicate flag presence.
static NicWatch & service()
Returns watch service.
~SocketFeedEngine() override
SocketFeedEngine(UInt32 dataWaitTime=10, UInt32 socketBufferSize=8 *1024 *1024, WatchService &watch=UtcWatch::service())
Current thread related tasks.
static void affinity(CpuIndex)
static void affinity(const ThreadAffinity &)
Sets the processor affinity mask for the current thread.
Represents set of CPU indices.
ThreadAffinity()
Initializes empty set.
std::string toString() const
Returns the string representation.
ThreadAffinity(const ThreadAffinity &)
Initializes as copy of other set.
bool empty() const
Indicates whether is empty.
~ThreadAffinity()
Utilizes all the resources.
bool erase(CpuIndex index)
Removes CPU index from the set.
void clear()
Makes set empty.
bool insert(CpuIndex index)
Adds CPU index into set.
void copyTo(CpuIndexes &) const
Copies set into another set.
static UtcWatch & service()
Returns watch service.
size_t CpuIndex
Zero-based index of CPU.
bool process(FeedEngine &engine)
Identifies reasons feed engine threads becomes idle.
virtual void onFeedEngineThreadBegin(const FeedEngineThreadPool &)
virtual ~FeedEngineThreadPoolListener()
virtual void onFeedEngineThreadIdle(const FeedEngineThreadPool &, FeedEngineThreadIdle::Reason, UInt32 &)
virtual void onFeedEngineThreadEnd(const FeedEngineThreadPool &)
FeedEngineThreadPoolSettings()
void threadCount(UInt32 value)
Sets threadsCount.
UInt32 spinBeforeIdleTime() const
ThreadAffinity & threadAffinity()
const ThreadAffinity & threadAffinity() const
void spinBeforeIdleTime(UInt32 value)
Sets redundancySpinTime.
UInt32 threadCount() const