erebus

changeset 47:4b91c9a501d8

minor fix of strange code structure in the thread func
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 01 Feb 2016 14:56:15 +0200
parents bab25c0ce337
children 9971a08f4104
files liberebus/src/threadpool.cc
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/liberebus/src/threadpool.cc	Tue Dec 29 12:19:53 2015 +0200
     1.2 +++ b/liberebus/src/threadpool.cc	Mon Feb 01 14:56:15 2016 +0200
     1.3 @@ -134,9 +134,7 @@
     1.4  void ThreadPool::thread_func()
     1.5  {
     1.6  	std::unique_lock<std::mutex> lock(workq_mutex);
     1.7 -	for(;;) {
     1.8 -		if(quit) break;
     1.9 -
    1.10 +	while(!quit) {
    1.11  		workq_condvar.wait(lock);
    1.12  
    1.13  		while(!quit && !workq.empty()) {