java.lang.ThreadGroup
2013-11-07 02:19
337 查看
public final void destroy():
Destroys this thread group and all of its subgroups. This thread group must be empty, indicating that all threads that had been in this thread group have since stopped.
First, the
public int activeGroupCount():
Returns an estimate of the number of active groups in this thread group and its subgroups. Recursively iterates over all subgroups in this thread group.
The value returned is only an estimate because the number of thread groups may change
dynamically while this method traverses internal data structures. This method is intended primarily
for debugging and monitoring purposes.
public final void checkAccess():
Determines if the currently running thread has permission to modify this thread group.
If there is a security manager, its
public final void setMaxPriority(int pri):
Sets the maximum priority of the group. Threads in the thread group that already have a higher priority are not affected.
First, the
If the
unchanged.
Otherwise, the priority of this ThreadGroup object is set to the smaller of the specified
then its maximum priority is simply set to
Destroys this thread group and all of its subgroups. This thread group must be empty, indicating that all threads that had been in this thread group have since stopped.
First, the
checkAccessmethod of this thread group is called with no arguments; this may result in a security exception.
public int activeGroupCount():
Returns an estimate of the number of active groups in this thread group and its subgroups. Recursively iterates over all subgroups in this thread group.
The value returned is only an estimate because the number of thread groups may change
dynamically while this method traverses internal data structures. This method is intended primarily
for debugging and monitoring purposes.
public final void checkAccess():
Determines if the currently running thread has permission to modify this thread group.
If there is a security manager, its
checkAccessmethod is called with this thread group as its argument. This may result in throwing a
SecurityException.
public final void setMaxPriority(int pri):
Sets the maximum priority of the group. Threads in the thread group that already have a higher priority are not affected.
First, the
checkAccessmethod of this thread group is called with no arguments; this may result in a security exception.
If the
priargument is less than
Thread.MIN_PRIORITYor greater than
Thread.MAX_PRIORITY, the maximum priority of the group remains
unchanged.
Otherwise, the priority of this ThreadGroup object is set to the smaller of the specified
priand 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
prias its argument, for every thread group that belongs to this thread group.
相关文章推荐
- java.lang.ThreadGroup学习笔记
- java.lang.ThreadGroup.enumerate
- Hive启动报错:Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: java.io.
- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/Nestabl
- Exception in thread "main" java.lang.UnsatisfiedLinkError:
- Atitit. Exception in thread "main" java.lang.Error: Unresolved compilation problem:
- Exception in thread "main" java.lang.IllegalArgumentException
- 错误:Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
- java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy
- Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
- Exception in thread "main" java.lang.UnsupportedClassVersionError
- Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bi
- Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.
- Java Eclipse Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
- java--java.lang.Thread.join() 方法
- 编译运行java程序出现Exception in thread "main" java.lang.UnsupportedClassVersionError: M : Unsupported major.minor version 51.0
- java.lang.OutOfMemoryError: unable to create new native thread解决方法
- Exception in thread "http-bio-8080-exec-10" java.lang.OutOfMemoryError: PermGen space
- Hadoop调试:Exception in thread "main"java.lang.UnsatisfiedLinkError
- IDEA 14.1.3-import之前的scala项目报错:Exception in thread "main" java.lang.ClassNotFoundException: kmust.hj