void PulseThread::WaitForComplete() { if (mThreadingDisabled) { OnPulse(); } else { mCompleteEvent.Wait(); } }
void PulseThread::OnRun() { while (!IsCancelled()) { mStartEvent.Wait(); if (IsCancelled()) { break; } OnPulse(); mCompleteEvent.Set(); } }
int GAnonPipe::OnEvent(GMessage *Msg) { switch (Msg->Msg) { case WM_TIMER: { OnPulse(); break; } } return 0; }