-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b132
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2185287 | 6-pool | Chris Hegarty | P3 | Closed | Won't Fix |
The CR 4519200 "(thread) Started thread does not terminate immediately if it was stopped before"
has a Fix Delivered state, but the following example still fails:
--------------------------------------------------------------
public class test {
public static void main(String[] argv) {
A a = new A();
a.stop();
a.start();
try {
a.join();
} catch (Throwable e) {
System.out.println("Unexpected exception" + e);
}
if(a.state) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
}
}
class A extends Thread {
public volatile boolean state = true;
public void run() {
state = false;
}
}
--------------------------------------------------------------
The evalutation of CR 4519200 contains the following note:
"The latency of thread stoppage will typically be 1-3 bytecodes...".
So either the spec should mention stoppage latency or implementation
should be fixed to terminate stopped thread immediately.
has a Fix Delivered state, but the following example still fails:
--------------------------------------------------------------
public class test {
public static void main(String[] argv) {
A a = new A();
a.stop();
a.start();
try {
a.join();
} catch (Throwable e) {
System.out.println("Unexpected exception" + e);
}
if(a.state) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
}
}
class A extends Thread {
public volatile boolean state = true;
public void run() {
state = false;
}
}
--------------------------------------------------------------
The evalutation of CR 4519200 contains the following note:
"The latency of thread stoppage will typically be 1-3 bytecodes...".
So either the spec should mention stoppage latency or implementation
should be fixed to terminate stopped thread immediately.
- backported by
-
JDK-2185287 (thread) Thread doesn't terminate immediately if it was stopped before start
- Closed
- duplicates
-
JDK-7015622 java/lang/Thread/StopBeforeStart.java fails
- Closed
- relates to
-
JDK-4519200 (thread) Started thread does not terminate immediately if it was stopped before
- Resolved
-
JDK-6566340 Restore use of stillborn flag to signify a thread that was stopped before it started
- Closed