MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / detach

Method detach

components/libc/cplusplus/cpp11/gcc/thread.cpp:71–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void thread::detach()
72 {
73 int err = EINVAL;
74
75 if (joinable())
76 err = pthread_detach(native_handle());
77 if (err)
78 {
79 throw_system_error(err, "thread::detach failed");
80 }
81
82 _m_thr = id();
83 }
84
85 // TODO: not yet actually implemented.
86 // The standard states that the returned value should only be considered a hint.

Callers

nothing calls this directly

Calls 2

pthread_detachFunction · 0.85
throw_system_errorFunction · 0.85

Tested by

no test coverage detected