MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / detach

Method detach

system/lib/libcxx/src/thread.cpp:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void thread::detach() {
55 int ec = EINVAL;
56 if (!__libcpp_thread_isnull(&__t_)) {
57 ec = __libcpp_thread_detach(&__t_);
58 if (ec == 0)
59 __t_ = _LIBCPP_NULL_THREAD;
60 }
61
62 if (ec)
63 std::__throw_system_error(ec, "thread::detach failed");
64}
65
66unsigned thread::hardware_concurrency() noexcept {
67#if defined(_SC_NPROCESSORS_ONLN)

Callers 5

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
detachFunction · 0.45

Calls 3

__throw_system_errorFunction · 0.70
__libcpp_thread_isnullFunction · 0.50
__libcpp_thread_detachFunction · 0.50

Tested by 4

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36