[Made ServerQueue threadsafe clinton@unknownlamer.org**20081113080954] { hunk ./source/ServerQueue.C 45 + BotLock queue_lock (queue_mutex); hunk ./source/ServerQueue.C 82 + // Locking around the entire queue flush prevents another thread + // from spamming the queue and preventing lower priority messages + // from ever being sent + BotLock flush_lock (queue_mutex); + hunk ./source/ServerQueue.C 95 - ServerQueueItem * sqi = (*serverQueue.begin()); + ServerQueueItem * sqi = serverQueue.front (); hunk ./source/ServerQueue.C 99 - serverQueue.erase(serverQueue.begin()); + + serverQueue.pop_front (); hunk ./source/ServerQueue.H 25 +#include "BotThreading.H" hunk ./source/ServerQueue.H 60 + BotMutex queue_mutex; }