if (mWorkerFunc) { OGRE_DELETE_T(mWorkerFunc, WorkerFunc, MEMCATEGORY_GENERAL); mWorkerFunc = 0; } mIsRunning = false; } //--------------------------------------------------------------------- void DefaultWorkQueue::notifyWorkers() { // wake up waiting thread OGRE_THREAD_NOTIFY_ONE(mRequestCondition) } //--------------------------------------------------------------------- void DefaultWorkQueue::waitForNextRequest() { #if OGRE_THREAD_SUPPORT // Lock; note that OGRE_THREAD_WAIT will free the lock OGRE_LOCK_MUTEX_NAMED(mRequestMutex, queueLock); if (mRequestQueue.empty()) { // frees lock and suspends the thread OGRE_THREAD_WAIT(mRequestCondition, mRequestMutex, queueLock); } // When we get back here, it's because we've been notified // and thus the thread has been woken up. Lock has also been
//--------------------------------------------------------------------- void DefaultWorkQueue::notifyWorkers() { // wake up waiting thread OGRE_THREAD_NOTIFY_ONE(mRequestCondition); }