JDK 19 |
---|
19 b15Fixed |
Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Thread::exit runs tear-down/cleanup code before a Thread terminates. It's impossible to reason about how this code might behave with an async exception. HotSpot has historically invoked the method up to 3 times or until the Thread.group field is null. That may have worked but this code will likely change significantly with loom. It's harder to reason about how the new code may behave with an async exception. Thread.stop is terminally deprecated and will likely be degraded to throw UOE in a release or two. This removes it from the user facing API but async exceptions are still possible with the debugger APIs. This issue tracks exploring if Thread::exit can be made immune to async exceptions. Maybe a new terminating state can be introduced so that sending an async exception does nothing when the thread is exiting.
|