[8463] Fixed race conditions in LockedQueue.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
XTZGZoReX 2009-08-30 23:23:46 +02:00 committed by ApoC
parent 7f444189c6
commit 66ffd80ed2
6 changed files with 42 additions and 86 deletions

View file

@ -71,9 +71,9 @@ void SqlQuery::Execute(Database *db)
void SqlResultQueue::Update()
{
/// execute the callbacks waiting in the synchronization queue
while(!empty())
MaNGOS::IQueryCallback* callback;
while (next(callback))
{
MaNGOS::IQueryCallback * callback = next();
callback->Execute();
delete callback;
}