bool Journal::PlayNext() { if (_State == PlayState) { _start(); Id id; mFile->read(&id); Functor* jrn = _create(id); AssertFatal(jrn,"Journal: Undefined function found in journal"); jrn->read(mFile); _finish(); _Dispatching = true; jrn->dispatch(); _Dispatching = false; delete jrn; if (_Count) return true; Stop(); //debugBreak(); } return false; }
void ThreadQueue::dispatchResponseCalls() { lock(); for(S32 i = 0; i < mResponseCalls.size(); i++) { Functor *c = mResponseCalls[i]; c->dispatch(this); delete c; } mResponseCalls.clear(); unlock(); }
void ThreadQueue::dispatchNextCall() { mSemaphore.wait(); lock(); if(mThreadCalls.size() == 0) { unlock(); return; } Functor *c = mThreadCalls.first(); mThreadCalls.pop_front(); unlock(); c->dispatch(this); delete c; }