nsISupportsPriority
From MDC
« XPCOM API Reference
nsISupportsPriority exposes the general notion of a scheduled object with an integral priority value. Following UNIX conventions, smaller (and possibly negative) values have higher priority.
nsISupportsPriority is defined in xpcom/threads/nsISupportsPriority.idl. It is scriptable and
unfrozen (hasn't changed since Mozilla 1.8).
Inherits from: nsISupports
Contents |
[edit] Method overview
void adjustPriority(in long delta);
|
[edit] Attributes
| Attribute | Type | Description |
priority
| long
| The object's priority. It can be modified to change the priority of the object. Typical priority values are defined in the idl file as PRIORITY_HIGHEST ... PRIORITY_LOWEST. The implementation is free to truncate a given priority value to whatever limits are appropriate. Typically this attribute is initialized to PRIORITY_NORMAL, but implementations may choose to assign a different initial value.
|
[edit] Constants
| Constant | Value | Description |
PRIORITY_HIGHEST
| -20 | The highest priority. |
PRIORITY_HIGH
| -10 | Higher than normal priority. |
PRIORITY_NORMAL
| 0 | The default priority. |
PRIORITY_LOW
| 10 | Lower than normal priority. |
PRIORITY_LOWEST
| 20 | The lowest priority. |
[edit] Methods
[edit] adjustPriority()
adjustPriority is a convenience method provided to adjust the priority attribute by a given amount delta.
void adjustPriority(in long delta);
[edit] Parameters
- delta
- The amount by which to adjust the
priorityattribute.
[edit] See also
See Changing the Priority of HTTP Requests for an example of using this interface to adjust the priority of an HTTP request.