jdk/src/share/classes/java/lang/ThreadGroup.java
/**
* Increments the count of unstarted threads in the thread group.
* Unstarted threads are not added to the thread group so that they
* can be collected if they are never started, but they must be
* counted so that daemon thread groups with unstarted threads in
* them are not destroyed.
*/
void addUnstarted() {
{- -------------------------------------------
(1) nUnstartedThreads フィールドの値をインクリメントするだけ.
(ただし, この ThreadGroup が既に破棄されている場合は, IllegalThreadStateException を出す)
---------------------------------------- -}
synchronized(this) {
if (destroyed) {
throw new IllegalThreadStateException();
}
nUnstartedThreads++;
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.