+ virtual void SetExitFlag();
+
+ /** Join the thread (calls SetExitFlag and waits for exit)
+ */
+ void join();
+};
+
+
+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()