Fixed ==25829== Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread

==25829== at 0x4C2A1D5: pthread_cond_broadcast_WRK (hg_intercepts.c:891)
==25829== by 0x654A758: std::condition_variable::notify_all() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==25829== by 0x132305A: ProducerConsumerQueue<SQLOperation*>::Cancel() (ProducerConsumerQueue.h:100)
==25829== by 0x13229A7: DatabaseWorkerPool<WorldDatabaseConnection>::~DatabaseWorkerPool() (DatabaseWorkerPool.h:70)
==25829== by 0x6C6CB21: __run_exit_handlers (exit.c:78)
==25829== by 0x6C6CB74: exit (exit.c:100)
==25829== by 0x6C54EF3: (below main) (libc-start.c:276)
This commit is contained in:
Shauren committed 2014-10-02 20:09:08 +02:00
1 parent 4322a0dc37
commit 04b6f9111a
1 file changed
+1 -3
@@ -82,7 +82,7 @@ public:
void Cancel()
{
_queueLock.lock();
std::unique_lock<std::mutex> lock(_queueLock);
while (!_queue.empty())
{
@@ -95,8 +95,6 @@ public:
_shutdown = true;
_queueLock.unlock();
_condition.notify_all();
}