53 return 0 != value_.bits_.eventsDispatched_;
59 value_.bits_.eventsDispatched_ = state ? 1 : 0;
65 return 0 != value_.bits_.ioWaited_;
71 value_.bits_.ioWaited_ = state ? 1 : 0;
77 return value_.bits_.reserved_;
83 value_.bits_.reserved_ = flags;
89 Flags eventsDispatched_ : 1;
203 , spinBeforeIdleTime_(1)
217 return threadAffinity_;
229 return threadAffinity_;
243 threadCount_ = value;
256 return spinBeforeIdleTime_;
262 spinBeforeIdleTime_ = value;
267 UInt32 spinBeforeIdleTime_;
320 class FeedEngineThreadPoolImpl;
321 FeedEngineThreadPoolImpl* impl_;
#define ONIXS_FMXUST_BIMP_NOTHROW
#define ONIXS_FMXUST_BIMP_OVERRIDE
#define ONIXS_FMXUST_BIMP_NULLPTR
EfViFeedEngine(UInt32 receiveRingSize=4095, WatchService &watch=NicWatch::service())
~EfViFeedEngine() ONIXS_FMXUST_BIMP_OVERRIDE
A pool of threads executing feed engine tasks.
FeedEngineThreadPool(const FeedEngineThreadPoolSettings &, FeedEngine *, FeedEngineThreadPoolListener *=ONIXS_FMXUST_BIMP_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.
NetFeedEngineProcessResult(UInt32 flags) ONIXS_FMXUST_BIMP_NOTHROW
bool ioWaited() const ONIXS_FMXUST_BIMP_NOTHROW
Indicates whether processing had to sleep in kernel while checking data availability.
void eventsDispatched(bool state) ONIXS_FMXUST_BIMP_NOTHROW
Indicates whether feed-related events like data reception or absence have been dispatched.
void ioWaited(bool state) ONIXS_FMXUST_BIMP_NOTHROW
Indicates whether processing had to sleep in kernel while checking data availability.
Flags reserved() const ONIXS_FMXUST_BIMP_NOTHROW
Reserved (unused) flags.
void reserved(Flags flags) ONIXS_FMXUST_BIMP_NOTHROW
Reserved (unused) flags.
bool eventsDispatched() const ONIXS_FMXUST_BIMP_NOTHROW
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(UInt32 dataWaitTime=10, UInt32 socketBufferSize=8 *1024 *1024, WatchService &watch=UtcWatch::service())
~SocketFeedEngine() ONIXS_FMXUST_BIMP_OVERRIDE
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.
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