The Scheduler supports the following threading models:
The model is configured via the OnixS::FIX::Scheduling::SessionSchedulerOptions::threadingModel(SchedulerThreadingModel::Enum value) method.
This threading model is the default one. In this mode, the Scheduler creates one thread to manage registered sessions. Additionally, one thread per session is created when a session needs to perform synchronous Logon/Logout.
In this mode, the Scheduler does not create any threads. Such mode means that the user creates additional threads himself (or uses the main thread) to perform event dispatching in a loop by calling the OnixS::FIX::Scheduling::SessionScheduler::dispatchEvents() routine. In this mode, the Scheduler uses asynchronous Logon/Logout. Therefore, only in this mode, the Scheduler can manage sessions that use the OnixS::FIX::ThreadingModel::ExternalThread threading model. The following example demonstrates how to use this threading model: