Following section depicts events fired by Handler and related with working threads Handler uses to process market data.
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.
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.