mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
d87b4d239b
The intent of idleDispatch is the possibility to have a runnable executed when the thread is idle. This is accomplished by adding an event queue for idle tasks that will only be considered when the main event queue is empty and the caller of ProcessNextEvent doesn't require that we wait until there is an event on the main event queue. MozReview-Commit-ID: IDWQfzZqWpZ --HG-- extra : rebase_source : 0d5bfeebd08e01597c2cd8b76e8e848d9f9c58f0
33 lines
1000 B
Plaintext
33 lines
1000 B
Plaintext
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
%{C++
|
|
namespace mozilla {
|
|
class TimeStamp;
|
|
}
|
|
%}
|
|
|
|
native TimeStamp(mozilla::TimeStamp);
|
|
|
|
/**
|
|
* An instance implementing nsIIdlePeriod is used by an associated
|
|
* nsIThread to estimate when it is likely that it will receive an
|
|
* event.
|
|
*/
|
|
[builtinclass, uuid(21dd35a2-eae9-4bd8-b470-0dfa35a0e3b9)]
|
|
interface nsIIdlePeriod : nsISupports
|
|
{
|
|
/**
|
|
* Return an estimate of a point in time in the future when we
|
|
* think that the associated thread will become busy. Should
|
|
* return TimeStamp() (i.e. the null time) or a time less than
|
|
* TimeStamp::Now() if the thread is currently busy or will become
|
|
* busy very soon.
|
|
*/
|
|
TimeStamp getIdlePeriodHint();
|
|
};
|