Thread.setPriority

Thread.setPriority

Class Overview | Class Members | This Package | All Packages

Syntax
public final void setPriority( int newPriority )
Description
Changes the priority of this thread.

First the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException.

Otherwise, the priority of this thread is set to the smaller of the specified newPriority and the maximum permitted priority of the thread's thread group.

Exceptions
IllegalArgumentException If the priority is not in the range MIN_PRIORITY to MAX_PRIORITY.
Exceptions
SecurityException if the current thread cannot modify this thread.
See Also
checkAccess, getPriority, getThreadGroup, MAX_PRIORITY, MIN_PRIORITY, getMaxPriority