0dc8abaa28
Now we have modularized the Mind class to contain all of its ComponentThreads. This enables us to run multiple mind instances within the same SMO process, at least in theory. We probably won't actually do this, but we want to ensure that the design is clean enough to enable it.
28 lines
754 B
C++
28 lines
754 B
C++
#include <iostream>
|
|
#include <componentThread.h>
|
|
#include <marionette/marionette.h>
|
|
|
|
|
|
int main(int argc, char *argv[], char *envp[])
|
|
{
|
|
/* We don't do anything inside of main()
|
|
* Main merely waits for the marionette thread to exit.
|
|
*/
|
|
std::cout << "CRT:" << __func__ << ": about to JOLT Mrntt with cmdline args"
|
|
<< '\n';
|
|
smo::mrntt::mrntt->getIoService().post(
|
|
[argc, argv, envp]()
|
|
{
|
|
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
|
|
<< '\n';
|
|
smo::CrtCommandLineArgs::set(argc, argv, envp);
|
|
smo::mrntt::mrntt->getIoService().stop();
|
|
}
|
|
);
|
|
|
|
smo::mrntt::mrntt->thread.join();
|
|
std::cout << "CRT:" << __func__ << ": Mrntt exited with code '"
|
|
<< smo::mrntt::exitCode << "'\n";
|
|
return smo::mrntt::exitCode;
|
|
}
|