Commit c50b8ccf authored by Stefan Westerfeld's avatar Stefan Westerfeld

Fix minor ThreadPool bug.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 370fc240
......@@ -23,6 +23,9 @@ ThreadPool::worker_next_job (Job& job)
{
std::unique_lock<std::mutex> lck (mutex);
if (stop_workers)
return false;
if (jobs.empty())
cond.wait (lck);
......
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