Flush queues on terminate() calls to unblock push()s and so ease threads termination

This commit is contained in:
vsonnier
2017-08-28 20:31:07 +02:00
parent 2d01a279e9
commit 3f90cbb858
8 changed files with 60 additions and 41 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ public:
std::thread::id currentThreadId = std::this_thread::get_id();
std::cout << "WARNING: Thread 0x" << std::hex << currentThreadId << std::dec <<
" (" << currentThreadId << ") executing {" << typeid(*this).name() << "}.push() has failed with timeout > " <<
(timeout * 0.001) << " ms, message: " << errorMessage << std::endl << std::flush;
(timeout * 0.001) << " ms, message: '" << errorMessage << "'" << std::endl << std::flush;
}
return false;
}
@@ -150,7 +150,7 @@ public:
std::thread::id currentThreadId = std::this_thread::get_id();
std::cout << "WARNING: Thread 0x" << std::hex << currentThreadId << std::dec <<
" (" << currentThreadId << ") executing {" << typeid(*this).name() << "}.pop() has failed with timeout > " <<
(timeout * 0.001) << " ms, message: " << errorMessage << std::endl << std::flush;
(timeout * 0.001) << " ms, message: '" << errorMessage << "'" << std::endl << std::flush;
}
return false;
}