Lines Matching +refs:timer +refs:create
37 PassRefPtr<WorkQueue::WorkItemWin> WorkQueue::WorkItemWin::create(const Function<void()>& function, WorkQueue* queue)
184 // FIXME: We need to ensure that any timer-queue timers that fire after this point don't try to
193 m_workItemQueue.append(WorkItemWin::create(function, this));
206 static PassRefPtr<TimerContext> create() { return adoptRef(new TimerContext); }
211 HANDLE timer;
214 TimerContext() : queue(0), timer(0) { }
228 ASSERT(timerContext->timer);
230 if (!::DeleteTimerQueueTimer(timerContext->queue->m_timerQueue, timerContext->timer, 0)) {
231 // Getting ERROR_IO_PENDING here means that the timer will be destroyed once the callback is done executing.
240 RefPtr<TimerContext> context = TimerContext::create();
245 // The timer callback could fire before ::CreateTimerQueueTimer even returns, so we protect
246 // context->timer with a mutex to ensure the timer callback doesn't access it before the
247 // timer handle has been stored in it.
250 // Since our timer callback is quick, we can execute in the timer thread itself and avoid
252 if (!::CreateTimerQueueTimer(&context->timer, m_timerQueue, timerCallback, context.get(), delay * 1000, 0, WT_EXECUTEINTIMERTHREAD)) {
258 // The timer callback will handle destroying context.