| 92 | } |
| 93 | |
| 94 | void detach() |
| 95 | { |
| 96 | if (!joinable()) |
| 97 | { |
| 98 | throw std::system_error{ std::make_error_code( |
| 99 | std::errc::invalid_argument) }; |
| 100 | } |
| 101 | |
| 102 | int err = thrd_detach(*handle_); |
| 103 | if (err == thrd_error) |
| 104 | { |
| 105 | throw std::system_error{ std::make_error_code( |
| 106 | std::errc::no_such_process) }; |
| 107 | } |
| 108 | |
| 109 | handle_ = std::nullopt; |
| 110 | } |
| 111 | }; |
| 112 | |
| 113 | template<> |
nothing calls this directly
no outgoing calls
no test coverage detected