MCPcopy Create free account
hub / github.com/comaps/comaps / ~Thread

Method ~Thread

libs/base/thread.cpp:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37Thread::Thread() {}
38
39Thread::~Thread()
40{
41 // @todo (ygorshenin@): in general, it's not a good practice to
42 // implicitly detach thread since detached threads work in
43 // background, consume system resources and make it hard to reason
44 // about program. Thus, all places where Thread is instantiated
45 // should be fixed to explicitly detach thread.
46 if (m_thread.joinable())
47 m_thread.detach();
48}
49
50bool Thread::Create(std::unique_ptr<IRoutine> && routine)
51{

Callers

nothing calls this directly

Calls 2

joinableMethod · 0.80
detachMethod · 0.45

Tested by

no test coverage detected