On Thu, 18 Jan 2024 08:02:27 GMT, David Holmes <[email protected]> wrote:
> It is really safe/correct to move this outside the synchronized block? I know > things have changed a bit with loom but we've "always" held a lock when doing > the actual interrupt. I'd have to check the VM logic to be sure it can be > called concurrently from multiple threads for the same target thread. This hasn't changed. The interruptLock is used to coordinate the add/remove of the nioBlocker. When there is no nioBlocker set then the interrupt status and unparking (as in JavaThread::interrupt) executes without the interruptLock. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17444#discussion_r1457092058
