mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[8463] Fixed race conditions in LockedQueue.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
7f444189c6
commit
66ffd80ed2
6 changed files with 42 additions and 86 deletions
|
|
@ -26,7 +26,6 @@ SqlDelayThread::SqlDelayThread(Database* db) : m_dbEngine(db), m_running(true)
|
|||
|
||||
void SqlDelayThread::run()
|
||||
{
|
||||
SqlOperation* s;
|
||||
#ifndef DO_POSTGRESQL
|
||||
mysql_thread_init();
|
||||
#endif
|
||||
|
|
@ -36,9 +35,9 @@ void SqlDelayThread::run()
|
|||
// if the running state gets turned off while sleeping
|
||||
// empty the queue before exiting
|
||||
ACE_Based::Thread::Sleep(10);
|
||||
while (!m_sqlQueue.empty())
|
||||
SqlOperation* s;
|
||||
while (m_sqlQueue.next(s))
|
||||
{
|
||||
s = m_sqlQueue.next();
|
||||
s->Execute(m_dbEngine);
|
||||
delete s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue