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_;
#define ONIXS_EUREX_EMDI_OVERRIDE
#define ONIXS_EUREX_EMDI_NULLPTR
#define ONIXS_EUREX_EMDI_NOEXCEPT
~EfViFeedEngine() ONIXS_EUREX_EMDI_OVERRIDE
EfViFeedEngine(UInt32 receiveRingSize=4095, WatchService &watch=NicWatch::service())
A pool of threads executing feed engine tasks.
FeedEngineThreadPool(const FeedEngineThreadPoolSettings &, FeedEngine *, FeedEngineThreadPoolListener *=ONIXS_EUREX_EMDI_NULLPTR)
const FeedEngineThreadPoolSettings settings() const
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.
bool ioWaited() const ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether processing had to sleep in kernel while checking data availability.
void eventsDispatched(bool state) ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether feed-related events like data reception or absence have been dispatched.
Flags reserved() const ONIXS_EUREX_EMDI_NOEXCEPT
Reserved (unused) flags.
bool eventsDispatched() const ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether feed-related events like data reception or absence have been dispatched.
NetFeedEngineProcessResult(UInt32 flags) ONIXS_EUREX_EMDI_NOEXCEPT
void reserved(Flags flags) ONIXS_EUREX_EMDI_NOEXCEPT
Reserved (unused) flags.
void ioWaited(bool state) ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether processing had to sleep in kernel while checking data availability.
UInt32 Flags
Aliases integral type whose bits are used to indicate flag presence.
static NicWatch & service()
Returns watch service.
~SocketFeedEngine() ONIXS_EUREX_EMDI_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