ThreadGroup.MaxPriority Property

Definition

Returns the maximum priority of this thread group. -or- Sets the maximum priority of the group.

public int MaxPriority { [Android.Runtime.Register("getMaxPriority", "()I", "")] get; [Android.Runtime.Register("setMaxPriority", "(I)V", "")] set; }
[<get: Android.Runtime.Register("getMaxPriority", "()I", "")>]
[<set: Android.Runtime.Register("setMaxPriority", "(I)V", "")>]
member this.MaxPriority : int with get, set

Property Value

the maximum priority that a thread in this thread group can have.

Attributes

Exceptions

if the new priority is greater than Thread.MAX_PRIORITY or less than Thread.MIN_PRIORITY

Remarks

Property getter documentation:

Returns the maximum priority of this thread group. Threads that are part of this group cannot have a higher priority than the maximum priority.

Added in 1.0.

Java documentation for java.lang.ThreadGroup.getMaxPriority().

Property setter documentation:

Sets the maximum priority of the group. Threads in the thread group that already have a higher priority are not affected.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

If the pri argument is less than Thread#MIN_PRIORITY or greater than Thread#MAX_PRIORITY, it is clamped to those values.

Otherwise, the priority of this ThreadGroup object is set to the smaller of the specified pri and the maximum permitted priority of the parent of this thread group. (If this thread group is the system thread group, which has no parent, then its maximum priority is simply set to pri.) Then this method is called recursively, with pri as its argument, for every thread group that belongs to this thread group.

Added in 1.0.

Java documentation for java.lang.ThreadGroup.setMaxPriority(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also