On Fri, 15 Nov 2024 20:10:45 GMT, Doug Lea <d...@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