| 24 | } |
| 25 | |
| 26 | void vsomeip_v3::auxiliary_context::start() { |
| 27 | context_.restart(); |
| 28 | |
| 29 | thread_ = std::thread([this]() mutable { |
| 30 | #if defined(__linux__) || defined(__QNX__) |
| 31 | pthread_setname_np(pthread_self(), "m_auxiliary"); |
| 32 | #endif |
| 33 | utility::set_thread_niceness(thread_niceness_); |
| 34 | VSOMEIP_INFO << "Started thread m_auxiliary, id " << std::hex << std::this_thread::get_id() |
| 35 | #if defined(__linux__) |
| 36 | << ", tid " << std::dec << static_cast<int>(syscall(SYS_gettid)) |
| 37 | #endif |
| 38 | ; |
| 39 | boost::asio::executor_work_guard<boost::asio::io_context::executor_type> work_guard(context_.get_executor()); |
| 40 | context_.run(); |
| 41 | |
| 42 | VSOMEIP_INFO << "Stopped thread m_auxiliary, id " << std::hex << std::this_thread::get_id() |
| 43 | #if defined(__linux__) |
| 44 | << ", tid " << std::dec << static_cast<int>(syscall(SYS_gettid)) |
| 45 | #endif |
| 46 | ; |
| 47 | }); |
| 48 | } |
| 49 | |
| 50 | void vsomeip_v3::auxiliary_context::stop() { |
| 51 | context_.stop(); |