Unverified Commit b37ee8b9 authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #1342

Use launch_thread API in the new middleman
parents e2df7a2c 744dcb0a
...@@ -28,14 +28,10 @@ middleman::~middleman() { ...@@ -28,14 +28,10 @@ middleman::~middleman() {
void middleman::start() { void middleman::start() {
if (!get_or(config(), "caf.middleman.manual-multiplexing", false)) { if (!get_or(config(), "caf.middleman.manual-multiplexing", false)) {
mpx_thread_ = std::thread{[this] { mpx_thread_ = sys_.launch_thread("caf.net.mpx", [this] {
CAF_SET_LOGGER_SYS(&sys_);
detail::set_thread_name("caf.net.mpx");
sys_.thread_started();
mpx_.set_thread_id(); mpx_.set_thread_id();
mpx_.run(); mpx_.run();
sys_.thread_terminates(); });
}};
} else { } else {
mpx_.set_thread_id(); mpx_.set_thread_id();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment