Commit c2b580cc authored by Dominik Charousset's avatar Dominik Charousset

Fix potential segfault in dec_detached_threads

parent d57b3c4f
...@@ -358,10 +358,9 @@ void actor_system::inc_detached_threads() { ...@@ -358,10 +358,9 @@ void actor_system::inc_detached_threads() {
} }
void actor_system::dec_detached_threads() { void actor_system::dec_detached_threads() {
if (--detached == 0) { std::unique_lock<std::mutex> guard{detached_mtx};
std::unique_lock<std::mutex> guard{detached_mtx}; if (--detached == 0)
detached_cv.notify_all(); detached_cv.notify_all();
}
} }
void actor_system::await_detached_threads() { void actor_system::await_detached_threads() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment