Boost.ASIO: upgrade io_service=>io_context, finally
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <boostAsioLinkageFix.h>
|
||||
#include <iostream>
|
||||
#include <pthread.h>
|
||||
#include <componentThread.h>
|
||||
@@ -18,13 +19,13 @@ int main(int argc, char *argv[], char *envp[])
|
||||
*/
|
||||
std::cout << "CRT:" << __func__ << ": about to JOLT Mrntt with cmdline args"
|
||||
<< '\n';
|
||||
smo::mrntt::thread->getIoService().post(
|
||||
boost::asio::post(smo::mrntt::thread->getIoContext(),
|
||||
[argc, argv, envp]()
|
||||
{
|
||||
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
|
||||
<< '\n';
|
||||
sscl::CrtCommandLineArgs::set(argc, argv, envp);
|
||||
smo::mrntt::thread->getIoService().stop();
|
||||
smo::mrntt::thread->getIoContext().stop();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user