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;
124 friend struct FeHelper;
188 typedef std::set<CpuIndex> CpuIndexes;
204 void copyTo(CpuIndexes&)
const;
207 bool insert(CpuIndex index);
210 bool erase(CpuIndex index);
219 std::string toString()
const;
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;
349 class ONIXS_EUREX_EMDI_API FeedEngineThreadPool
352 FeedEngineThreadPool(
355 ~FeedEngineThreadPool();
360 FeedEngineThreadPool(
const FeedEngineThreadPool&);
361 FeedEngineThreadPool& operator=(
const FeedEngineThreadPool&);
364 class FeedEngineThreadPoolImpl;
365 FeedEngineThreadPoolImpl* impl_;
374 static void affinity(CpuIndex);
virtual void onFeedEngineThreadEnd(const FeedEngineThreadPool &)
The Feed Engine machinery.
Represents set of CPU indices.
#define ONIXS_EUREX_EMDI_NULLPTR
virtual void onFeedEngineThreadBegin(const FeedEngineThreadPool &)
UInt32 threadCount() const
virtual ~FeedEngineThreadPoolListener()
FeedEngineThreadPoolSettings()
#define ONIXS_EUREX_EMDI_NOEXCEPT
#define ONIXS_EUREX_EMDI_OVERRIDE
ThreadAffinity & threadAffinity()
void reserved(Flags flags) ONIXS_EUREX_EMDI_NOEXCEPT
Reserved (unused) flags.
void spinBeforeIdleTime(UInt32 value)
Sets redundancySpinTime.
bool ioWaited() const ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether processing had to sleep in kernel while checking data availability.
void ioWaited(bool state) 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.
size_t CpuIndex
Zero-based index of CPU.
Designed to reflect various aspects of feed engine processing flow.
bool process(FeedEngine &engine)
Identifies reasons feed engine threads becomes idle.
The given class implements feed engine concept using pool of working threads and standard socket API...
static UtcWatch & service()
Returns watch service.
const ThreadAffinity & threadAffinity() const
NetFeedEngineProcessResult(UInt32 flags) ONIXS_EUREX_EMDI_NOEXCEPT
UInt32 Flags
Aliases integral type whose bits are used to indicate flag presence.
Flags reserved() const ONIXS_EUREX_EMDI_NOEXCEPT
Reserved (unused) flags.
static NicWatch & service()
Returns watch service.
NetFeedEngineProcessResult process()
bool eventsDispatched() const ONIXS_EUREX_EMDI_NOEXCEPT
Indicates whether feed-related events like data reception or absence have been dispatched.
virtual void onFeedEngineThreadIdle(const FeedEngineThreadPool &, FeedEngineThreadIdle::Reason, UInt32 &)
The given class implements the Feed Engine concept using the Solarlfare ef_vi SDK.
void threadCount(UInt32 value)
Sets threadsCount.
UInt32 spinBeforeIdleTime() const
Current thread related tasks.