Run state handlers on the main thread (breaking change for control).

This commit is contained in:
Alexey Rybalchenko
2018-06-14 13:38:21 +02:00
committed by Dennis Klein
parent c064da91df
commit a53ef79552
11 changed files with 284 additions and 270 deletions

View File

@@ -13,11 +13,12 @@
using namespace fair::mq;
DeviceRunner::DeviceRunner(int argc, char* const argv[])
: fRawCmdLineArgs{tools::ToStrVector(argc, argv, false)}
, fPluginManager{PluginManager::MakeFromCommandLineOptions(fRawCmdLineArgs)}
, fDevice{nullptr}
{
}
: fRawCmdLineArgs(tools::ToStrVector(argc, argv, false))
, fPluginManager(PluginManager::MakeFromCommandLineOptions(fRawCmdLineArgs))
, fConfig()
, fDevice(nullptr)
, fEvents()
{}
auto DeviceRunner::Run() -> int
{
@@ -87,6 +88,9 @@ auto DeviceRunner::Run() -> int
// Instantiate and run plugins
fPluginManager->InstantiatePlugins();
// Run the device
fDevice->RunStateMachine();
// Wait for control plugin to release device control
fPluginManager->WaitForPluginsToReleaseDeviceControl();