Summary
Terminally deprecate Thread.stop().
Problem
Thread.stop is inherently unsafe. It has been deprecated since Java 1.2. In addition to being unsafe for applications and libraries to use, it works inconsistently and creates a burden on the runtime to have to deal with "async" exceptions at sensitive times. Project Loom is planning virtual threads that do not support Thread.stop and will re-specify this method to work in a degraded way.
Solution
Terminally deprecate Thread.stop() so that it can be degraded and/or removed in the future.
No changes are proposed for the the JVM TI function StopThread, the JDWP ThreadReference/Stop command, or the JDI ThreadReference.stop methods.
Specification
Change: @Deprecated(since="1.2") to: @Deprecated(since="1.2", forRemoval=true)
No change is proposed for the deprecation message.
- csr of
-
JDK-8277861 Terminally deprecate Thread.stop
-
- Resolved
-
- links to
-
Review
openjdk/jdk/6616