[Webkit-unassigned] [Bug 74535] [chromium] Add postCancellable[Delayed]Task to CCThread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 14 17:18:53 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74535





--- Comment #11 from James Robinson <jamesr at chromium.org>  2011-12-14 17:18:53 PST ---
We don't want to use WebCore::Timer directly in our code - it's a dependency we don't want and the scheduling it uses is not good for our use. My suggestion was that you look at the API it uses and see if there are any interesting lessons.  The way it works is something like this:

class A {
  void scheduleSomethingForLater()
  void timerFired(Timer<A>*);
  Timer<A> m_timer;
};

A::A()
  : m_timer(this, &A::timerFired) { }

A::scheduleSomethingForLater()
{
  m_timer.startOneShot(delay); // or startRepeating(), etc
}

~Timer cancels the task.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list