Skip to content
Snippets Groups Projects
Commit 1a267418 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

thread pool: release tasks on stop

parent 0f8d8914
No related branches found
No related tags found
No related merge requests found
...@@ -106,8 +106,7 @@ ThreadPool::stop() ...@@ -106,8 +106,7 @@ ThreadPool::stop()
{ {
std::lock_guard<std::mutex> l(lock_); std::lock_guard<std::mutex> l(lock_);
running_ = false; running_ = false;
while (not tasks_.empty()) tasks_ = {};
tasks_.pop();
cv_.notify_all(); cv_.notify_all();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment