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

@@ -79,10 +79,10 @@ class FairMQStateMachine
void CallStateChangeCallbacks(const State state) const;
std::string GetCurrentStateName() const;
static std::string GetStateName(const State);
int GetCurrentState() const;
bool CheckCurrentState(int state) const;
bool CheckCurrentState(std::string state) const;
bool Terminated();
// actions to be overwritten by derived classes
virtual void InitWrapper() {}
@@ -94,8 +94,10 @@ class FairMQStateMachine
virtual void Exit() {}
virtual void Unblock() {}
void ProcessWork();
private:
int GetEventNumber(const std::string& event);
static int GetEventNumber(const std::string& event);
std::mutex fChangeStateMutex;