On Fri, 5 Jan 2024 17:28:30 GMT, Alan Bateman <[email protected]> wrote:
>> src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java
>> line 180:
>>
>>> 178: Thread me = Thread.currentThread();
>>> 179: if (me.isInterrupted()) {
>>> 180: interruptor.interrupt(me);
>>
>> The new javadoc comment on `Interruptor.interrupt(Thread)` states that "This
>> method is invoked while holding the Thread's interrupt lock.", which isn't
>> the case when being invoked from here.
>
> This is an internal interface, I can re-phrase the method description to make
> it clear that this is when Thread.interrupt is called.
I've update the method descriptions in sun.nio.ch.Interruptible and hopefully
it is a bit clearer now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17219#discussion_r1444309663