+
+class CoreExport QueuedThread : public Thread
+{
+ ThreadQueueData queue;
+ protected:
+ /** Waits for an enqueue operation to complete
+ * You MUST hold the queue lock when you call this.
+ * It will be unlocked while you wait, and will be relocked
+ * before the function returns
+ */
+ void WaitForQueue()
+ {
+ queue.Wait();
+ }
+ public:
+ /** Lock queue.
+ */
+ void LockQueue()
+ {
+ queue.Lock();
+ }
+ /** Unlock queue.
+ */
+ void UnlockQueue()
+ {
+ queue.Unlock();
+ }
+ /** Unlock queue and wake up worker
+ */
+ void UnlockQueueWakeup()
+ {
+ queue.Wakeup();
+ queue.Unlock();
+ }
+ virtual void SetExitFlag()