gecko-dev/xpcom/threads
Boris Zbarsky 3ae961a2da Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug
We could try to move the EnforcePendingTaskGuarantee() bit into
PeekIdleDeadline, but then we'd need to check HasReadyEvent() on
mDeferredTimersQueue and mIdleQueue before we possibly unlock the mutex under
PeekIdleDeadline, and it's not clear that that state cannot change once the
mutex is unlocked...

The EnsureIsActive() call at the end of GetIdleDeadlineInternal in the !aIsPeek
case only makes sense if there are in fact idle tasks available to run when
GetDeadlineForIdleTask is called, because otherwise it would incorrectly set us
active when we are not running any tasks.

Differential Revision: https://phabricator.services.mozilla.com/D49696

--HG--
rename : xpcom/threads/PrioritizedEventQueue.cpp => xpcom/threads/IdlePeriodState.cpp
rename : xpcom/threads/PrioritizedEventQueue.h => xpcom/threads/IdlePeriodState.h
extra : moz-landing-system : lando
2019-10-20 15:08:44 +00:00
..
AbstractEventQueue.h Bug 1524006 - Add a medium-high priority queue between high and normal, r=froydnj 2019-02-28 22:38:53 +02:00
AbstractThread.cpp Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj 2019-02-25 16:14:01 -06:00
AbstractThread.h
BlockingResourceBase.cpp Bug 1053379 - Simplify CodeAddressService so non-DMD users can rely on defaults. r=njn 2019-08-06 21:58:12 +00:00
BlockingResourceBase.h Bug 1536129 - Fix !MOZ_CALLSTACK_DISABLED blocking resource acquisition checking, r=erahm 2019-03-19 17:12:42 +00:00
components.conf Bug 1539029 - pt 1 - give RDD its own process selector. r=froydnj 2019-04-09 21:13:16 +00:00
CondVar.h
CPUUsageWatcher.cpp Bug 1534878 - xpcom: Make some global functions static. r=erahm 2019-02-24 17:35:59 -08:00
CPUUsageWatcher.h
DataMutex.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
DeadlockDetector.h
EventQueue.cpp
EventQueue.h Bug 1563063 - Cross-process idle handling, r=farre 2019-09-24 14:33:57 +00:00
IdlePeriodState.cpp Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
IdlePeriodState.h Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
IdleTaskRunner.cpp Bug 1515216, ensure IdleTaskRunners are added only once to RefreshDriver's idle runnable list, r=mccr8 2019-04-15 15:41:15 +00:00
IdleTaskRunner.h
InputEventStatistics.cpp
InputEventStatistics.h
LazyIdleThread.cpp Bug 1559220 - Special case IndexedDB threads in wakeup telemetry, r=erahm 2019-06-16 21:03:45 +00:00
LazyIdleThread.h
LeakRefPtr.h
MainThreadIdlePeriod.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
MainThreadIdlePeriod.h
MainThreadQueue.h Bug 1552958 - De-templatize PrioritizedEventQueue, r=froydnj 2019-05-21 18:20:34 +00:00
MainThreadUtils.h
Monitor.h Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
moz.build Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
MozPromise.h Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley 2019-09-20 04:09:46 +00:00
MozPromiseInlines.h Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley 2019-09-20 04:09:46 +00:00
Mutex.h Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
nsEnvironment.cpp Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj 2019-09-10 13:51:09 +00:00
nsEnvironment.h
nsICancelableRunnable.h
nsIEnvironment.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIEventTarget.idl Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
nsIIdlePeriod.idl
nsIIdleRunnable.h
nsINamed.idl
nsIProcess.idl
nsIRunnable.idl Bug 1566459, add a way to check underlying IPC message type from runnable, r=nika 2019-07-16 19:21:40 +00:00
nsISerialEventTarget.idl
nsISupportsPriority.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIThread.idl Bug 1559220 - Special case IndexedDB threads in wakeup telemetry, r=erahm 2019-06-16 21:03:45 +00:00
nsIThreadInternal.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIThreadManager.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIThreadPool.idl Bug 1535361 - Let stream transport service idle with 5 threads instead of only one to not create/kill threads in quick bursts; add option to thread pool to shorten the idle timeout progressively with number of idle thread to save memory, r=dragana 2019-03-19 14:35:12 +00:00
nsITimer.idl Bug 1539499. Make nsITimer builtinclass. r=froydnj 2019-03-28 13:09:03 +00:00
nsMemoryPressure.cpp
nsMemoryPressure.h Bug 1560931 - Fire memory-pressure-stop events on Windows r=gsvelto 2019-06-24 18:22:53 +01:00
nsProcess.h Bug 1584969 - Use nsMaybeWeakPtr to simplify the nsIProcess implementation r=kmag 2019-09-30 18:28:31 +00:00
nsProcessCommon.cpp Bug 1584969 - Use nsMaybeWeakPtr to simplify the nsIProcess implementation r=kmag 2019-09-30 18:28:31 +00:00
nsProxyRelease.cpp Bug 1482608 - Add owning thread pointer holders for Rust code. r=nika,myk 2019-03-25 04:49:24 +00:00
nsProxyRelease.h Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi 2019-03-21 11:48:33 +00:00
nsThread.cpp Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
nsThread.h Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
nsThreadManager.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
nsThreadManager.h Backed out changeset 9364cff86a7e (bug 1584568) by dev's request 2019-09-27 23:54:11 +03:00
nsThreadPool.cpp Bug 1583964 - make IsOnCurrentThread for thread pools constant-time; r=KrisWright 2019-09-25 22:02:08 +00:00
nsThreadPool.h Bug 1535361 - Let stream transport service idle with 5 threads instead of only one to not create/kill threads in quick bursts; add option to thread pool to shorten the idle timeout progressively with number of idle thread to save memory, r=dragana 2019-03-19 14:35:12 +00:00
nsThreadSyncDispatch.h
nsThreadUtils.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
nsThreadUtils.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
nsTimerImpl.cpp Bug 1545120: Simplify this callback management stuff a little. r=froydnj 2019-04-18 14:53:18 +00:00
nsTimerImpl.h Bug 1545120: Simplify this callback management stuff a little. r=froydnj 2019-04-18 14:53:18 +00:00
PerformanceCounter.cpp
PerformanceCounter.h
PrioritizedEventQueue.cpp Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
PrioritizedEventQueue.h Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
Queue.h
RecursiveMutex.cpp
RecursiveMutex.h Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
ReentrantMonitor.h Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
RWLock.cpp
RWLock.h
SchedulerGroup.cpp Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj 2019-02-25 16:14:01 -06:00
SchedulerGroup.h
SharedThreadPool.cpp
SharedThreadPool.h
StateMirroring.h
StateWatching.h
SynchronizedEventQueue.cpp
SynchronizedEventQueue.h Bug 1563063 - Cross-process idle handling, r=farre 2019-09-24 14:33:57 +00:00
SyncRunnable.h
SystemGroup.cpp Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj 2019-02-25 16:14:01 -06:00
SystemGroup.h
TaskCategory.h
TaskDispatcher.h
TaskQueue.cpp Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
TaskQueue.h Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
ThreadBound.h
ThreadDelay.cpp Bug 1534878 - xpcom: #include headers for global functions' declarations. r=erahm 2019-03-07 23:32:54 -08:00
ThreadDelay.h
ThreadEventQueue.cpp Bug 1563063 - Cross-process idle handling, r=farre 2019-09-24 14:33:57 +00:00
ThreadEventQueue.h Bug 1563063 - Cross-process idle handling, r=farre 2019-09-24 14:33:57 +00:00
ThreadEventTarget.cpp Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
ThreadEventTarget.h Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE 2019-09-25 04:25:07 +03:00
ThreadLocalVariables.cpp Bug 1532253 - Add NS_NewURIOnAnyThread r=baku 2019-03-19 15:11:31 +00:00
ThrottledEventQueue.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-05-25 17:46:15 +00:00
ThrottledEventQueue.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-05-25 17:46:15 +00:00
TimerThread.cpp Bug 1570982 - remove CPP_THROW_NEW; r=glandium 2019-08-14 01:32:41 +00:00
TimerThread.h