ThreadGroupEx.setMaxPriority

Sets the maximum priority of the group. Threads in the thread group that already have a higher priority are not affected. <p> First, the {@code checkAccess} method of this thread group is called with no arguments; this may result in a security exception. <p> If the {@code pri} argument is less than {@link Thread#PRIORITY_MIN} or greater than {@link Thread#PRIORITY_MAX}, the maximum priority of the group remains unchanged. <p> Otherwise, the priority of this ThreadGroupEx object is set to the smaller of the specified {@code 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 {@code pri}.) Then this method is called recursively, with {@code pri} as its argument, for every thread group that belongs to this thread group.

@param pri the new priority of the thread group. @throws SecurityException if the current thread cannot modify this thread group. @see #getMaxPriority @see java.lang.SecurityException @see java.lang.ThreadGroupEx#checkAccess()

class ThreadGroupEx
final
void
setMaxPriority
(
int pri
)

Meta