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

thread pool: release tasks on stop

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