Commit 99d9c186 authored by Eric Cano's avatar Eric Cano
Browse files

Partially reverting commit b2b5bb58 as

the atomic counter was probably fine. Leaving the debug level diagnostics in the DiskReadThreadPool code.
parent 810d1ff9
......@@ -44,13 +44,7 @@ template <class T> struct AtomicCounter{
T operator -- () {
MutexLocker ml(&m_mutex);
// Store the return value in a local variable
// instead of returning --m_val, which is a reference
// to the value. If this reference to value gets cast into value
// and evaluated after the destruction of ml, we have a race
// condition (which we seemed to experience under rare circumstances).
T ret = --m_val;
return ret;
return --m_val;
operator T() const {
MutexLocker ml(&m_mutex);
Supports Markdown
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