gecko/xpcom/threads
Boris Zbarsky dd94d998a3 Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan
This implements proposal 3 from bug 650379 comment 13.  The main difference
between TYPE_REPEATING_PRECISE and TYPE_REPEATING_PRECISE_CAN_SKIP is to not
AddTimer the REPEATING_PRECISE_CAN_SKIP timer until after the callback has run;
this guarantees that no more timer events will be posted until after the
callback finishes executing.  A secondary change is to make
REPEATING_PRECISE_CAN_SKIP timers advance their firing time to mDelay from when
PostTimerEvent is called, not mDelay from the old mTimeout.  While this arguably
makes them less precise, the alternative is that if a timer is significantly
delayed for some reason (e.g. because the user puts the computer to sleep for a
while) it will then fire a whole bunch of times to "catch up" to where it's
supposed to be, advancing its firing time by mDelay at a time.  That seems
undesirable.

An alternate approach would have been to readd the timer from inside
PostTimerEvent, but only if we're not in the middle of firing the timer. That
would allow more precise timers in the case when the callback is not taking too
long, but still handle gracefully the case when the callback is
slow. Unfortunately this falls down if something _else_ is hogging the main
thread event loop (e.g. some other timer has a slow callback, or whatever); in
that case we would post multiple events for the one precise timer while the
event-loop-hogging operation is running. So I don't think we should do that.
2011-04-28 19:33:52 -04:00
..
Makefile.in Bug 514665 - fix stupid module name differences on windows. r=ted 2009-09-25 18:41:16 +02:00
nsEnvironment.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsEnvironment.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsEventQueue.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsEventQueue.h Bug 508760 - Remove MSVC6 support from the tree; (Jv1) nsEventQueue.h. 2011-04-14 12:47:41 +02:00
nsIEnvironment.idl
nsIEventTarget.idl
nsIProcess.idl Bug 411511: Make nsIProcess accept Unicode paths as well as native charset, r=bsmedberg 2010-03-18 10:37:12 +02:00
nsIRunnable.idl Bug 540665 - Make nsIRunnable a function so JS can use it as such. r=benjamin 2010-05-07 09:52:04 +02:00
nsISupportsPriority.idl
nsIThread.idl
nsIThreadInternal.idl Bug 612807 - 'IndexedDB: Transaction thread observer isn't quite safe'. r=jst, a=blocking+. 2010-11-18 14:19:19 -08:00
nsIThreadManager.idl Bug 609501 - Change nsIThreadManager for bug 580096. r=jst 2010-11-03 18:41:06 -07:00
nsIThreadPool.idl
nsITimer.idl Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan 2011-04-28 19:33:52 -04:00
nsProcess.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsProcessCommon.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsThread.cpp Bug 639754 - Remove MOZ_IPC checks since IPC is always built now; r=bsmedberg 2011-04-02 19:14:00 -07:00
nsThread.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsThreadManager.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsThreadManager.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsThreadPool.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsThreadPool.h
nsThreadUtilsInternal.h
nsTimerImpl.cpp Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan 2011-04-28 19:33:52 -04:00
nsTimerImpl.h Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan 2011-04-28 19:33:52 -04:00
TimerThread.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
TimerThread.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00