OnixS C++ CME Market Data Handler  2.56.0.0
Listening for Working Threads Events

Following section depicts events fired by Handler and related with working threads Handler uses to process market data.

Working Threads Events

Handler uses pool of threads according to processing strategy defined in Handler settings. Handler starts all threads at the beginning of market data processing and uses them until market data processing is accomplished. Threads are not started and stopped at Handler's run time.

For each thread used by Handler, following events are fired by Handler instance:

Event Description
OnixS::CME::MarketData::ThreadListener::onThreadBegin Invoked when thread is just started.
OnixS::CME::MarketData::ThreadListener::onThreadEnd Invoked when thread is about to exit.

Each member of listener instance is invoked by the thread whom the particular event refers to. Therefore, it's possible to perform initialization operations referring to a particular thread like managing thread priority.

Note
Handler uses working threads not only during live market data processing, but also when market data is replayed from previously recorded log file. So, events are fired in case of replaying log files as well.

To get subscribed to threads events, it's necessary to register instance of OnixS::CME::MarketData::ThreadListener class in particular Handler instance using OnixS::CME::MarketData::Handler::registerThreadListener member.