MCPcopy Create free account
hub / github.com/COVESA/vsomeip / start

Method start

implementation/endpoints/src/auxiliary_context.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void 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
50void vsomeip_v3::auxiliary_context::stop() {
51 context_.stop();

Callers

nothing calls this directly

Calls 3

get_idFunction · 0.85
restartMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected