Added central control of threading.
This commit is contained in:
1 parent
ef3b39361a
commit
2769de6f7e
25 files changed
+259
-110
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include "lib/config/protos/quickbus_cfg.pb.h"
|
||||
#include "lib/os/os.h"
|
||||
#include "lib/utils/bts_assert.h"
|
||||
#include "lib/utils/thread_manager.h"
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <thread>
|
||||
@@ -71,8 +72,8 @@ Router& Quickbus::router() const
|
||||
void Quickbus::init()
|
||||
{
|
||||
if (me->thread_options == ThreadOptions::own_thread) {
|
||||
me->worker = std::make_unique<std::thread> (std::thread ([this] () {
|
||||
os::set_thread_name("quickbus");
|
||||
me->worker = std::make_unique<std::thread> (
|
||||
threading::make_thread("quickbus", [this] () {
|
||||
me->io_service.run();
|
||||
}));
|
||||
me->do_work_tid = me->worker->get_id();
|
||||
|
||||
Reference in new issue
Block a user