RFR: 8344197: SM cleanup in java.util.concurrent [v3]

Alan Bateman alanb at openjdk.org
Sat Nov 16 08:16:48 UTC 2024


On Fri, 15 Nov 2024 20:10:45 GMT, Doug Lea <dl at openjdk.org> wrote:

> A side question: Are there now any situations in which Thread.interrupt can throw an exception? If not, a few more things in j.u.c and elsewhere could be simplified someday.

It's possible to extend Thread and override interrupt so in theory it might run anything. Even if not overridden it may have to execute quite a bit of code because of hooks for interruptible channels or interrupting a virtual thread will need to queue the task for the thread. The latter is hardened for cases like OOME but maybe not SOE.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22119#issuecomment-2480474661


More information about the core-libs-dev mailing list