Moved JOLT state tracking into ComponentThread::
This commit is contained in:
+5
-5
@@ -22,9 +22,9 @@ void Mind::initialize()
|
||||
|
||||
/* Jolt the threads, then start them */
|
||||
ComponentThread::joltAllMindThreadsReq(
|
||||
[this]()
|
||||
[]()
|
||||
{
|
||||
this->threadsHaveBeenJolted = true;
|
||||
ComponentThread::threadsHaveBeenJolted.store(true);
|
||||
std::cout << "Mrntt: All mind threads JOLTed." << "\n";
|
||||
ComponentThread::startAllMindThreadsReq(
|
||||
[]()
|
||||
@@ -42,12 +42,12 @@ void Mind::finalizeReq(std::function<void()> callback)
|
||||
* otherwise they'll just enter their main loops and wait for control
|
||||
* messages from mrntt after processing the exit request.
|
||||
*/
|
||||
if (!threadsHaveBeenJolted)
|
||||
if (!ComponentThread::threadsHaveBeenJolted.load())
|
||||
{
|
||||
ComponentThread::joltAllMindThreadsReq(
|
||||
[this, callback]()
|
||||
[callback]()
|
||||
{
|
||||
this->threadsHaveBeenJolted = true;
|
||||
ComponentThread::threadsHaveBeenJolted.store(true);
|
||||
ComponentThread::exitAllMindThreadsReq(
|
||||
[callback]()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user