Browse Source
Merge pull request #6512 from ReinUsesLisp/wait-detached-stasks
common/detached_tasks: Wait for tasks before shutting down
pull/15/merge
Mai M
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
src/common/detached_tasks.cpp
|
|
|
@ -21,6 +21,8 @@ void DetachedTasks::WaitForAllTasks() { |
|
|
|
} |
|
|
|
|
|
|
|
DetachedTasks::~DetachedTasks() { |
|
|
|
WaitForAllTasks(); |
|
|
|
|
|
|
|
std::unique_lock lock{mutex}; |
|
|
|
ASSERT(count == 0); |
|
|
|
instance = nullptr; |
|
|
|
|