Bug 1867190 - Initialise the PHC allocate delay later r=glandium
[gecko.git] / xpcom / threads / nsISupportsPriority.idl
blobd0b8b9a3ddb08994eca5a35c59d54a6da9a34e65
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 /**
8 * This interface exposes the general notion of a scheduled object with a
9 * integral priority value. Following UNIX conventions, smaller (and possibly
10 * negative) values have higher priority.
12 * This interface does not strictly define what happens when the priority of an
13 * object is changed. An implementation of this interface is free to define
14 * the side-effects of changing the priority of an object. In some cases,
15 * changing the priority of an object may be disallowed (resulting in an
16 * exception being thrown) or may simply be ignored.
18 [scriptable, uuid(aa578b44-abd5-4c19-8b14-36d4de6fdc36)]
19 interface nsISupportsPriority : nsISupports
21 /**
22 * Typical priority values.
24 const long PRIORITY_HIGHEST = -20;
25 const long PRIORITY_HIGH = -10;
26 const long PRIORITY_NORMAL = 0;
27 const long PRIORITY_LOW = 10;
28 const long PRIORITY_LOWEST = 20;
30 /**
31 * This attribute may be modified to change the priority of this object. The
32 * implementation of this interface is free to truncate a given priority
33 * value to whatever limits are appropriate. Typically, this attribute is
34 * initialized to PRIORITY_NORMAL, but implementations may choose to assign a
35 * different initial value.
37 attribute long priority;
39 /**
40 * This method adjusts the priority attribute by a given delta. It helps
41 * reduce the amount of coding required to increment or decrement the value
42 * of the priority attribute.
44 void adjustPriority(in long delta);