mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Run InitTask in the worker thread (same as all other state handlers).
This commit is contained in:
committed by
Mohammad Al-Turany
parent
bfb9feab03
commit
6349438829
@@ -176,8 +176,14 @@ struct FairMQFSM_ : public msmf::state_machine_def<FairMQFSM_>
|
||||
LOG(STATE) << "Entering INITIALIZING TASK state";
|
||||
fsm.fState = INITIALIZING_TASK;
|
||||
|
||||
fsm.InitTaskWrapper();
|
||||
// fsm.fInitializingTaskThread = std::thread(&FairMQFSM_::InitTaskWrapper, &fsm);
|
||||
std::unique_lock<std::mutex> lock(fsm.fWorkMutex);
|
||||
while (fsm.fWorkActive)
|
||||
{
|
||||
fsm.fWorkDoneCondition.wait(lock);
|
||||
}
|
||||
fsm.fWorkAvailable = true;
|
||||
fsm.fWork = std::bind(&FairMQFSM_::InitTaskWrapper, &fsm);
|
||||
fsm.fWorkAvailableCondition.notify_one();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user