30 lines
676 B
C++
30 lines
676 B
C++
|
|
#include <mind.h>
|
|
#include <componentThread.h>
|
|
|
|
namespace smo {
|
|
|
|
void Mind::initialize()
|
|
{
|
|
/* Start the threads */
|
|
for (auto& componentThread : smo::ComponentThread::componentThreads)
|
|
{
|
|
// Post startThread() to the event loop of all threads except MRNTT.
|
|
if (componentThread->id == ComponentThread::MRNTT) { continue; }
|
|
|
|
// JOLT the thread.
|
|
componentThread->getIoService().post([componentThread]()
|
|
{ componentThread->getIoService().stop(); }
|
|
);
|
|
|
|
// Now tell it to execute its initialization sequence.
|
|
componentThread->startThreadReq();
|
|
}
|
|
}
|
|
|
|
void Mind::finalize(void)
|
|
{
|
|
}
|
|
|
|
} // namespace smo
|