# HG changeset patch # User John Tsiombikas # Date 1454331375 -7200 # Node ID 4b91c9a501d89a7777654ee790e33abe0f1c985d # Parent bab25c0ce3379cae1286ea05c4574070fcbcda32 minor fix of strange code structure in the thread func diff -r bab25c0ce337 -r 4b91c9a501d8 liberebus/src/threadpool.cc --- a/liberebus/src/threadpool.cc Tue Dec 29 12:19:53 2015 +0200 +++ b/liberebus/src/threadpool.cc Mon Feb 01 14:56:15 2016 +0200 @@ -134,9 +134,7 @@ void ThreadPool::thread_func() { std::unique_lock lock(workq_mutex); - for(;;) { - if(quit) break; - + while(!quit) { workq_condvar.wait(lock); while(!quit && !workq.empty()) {