3 ms·
"AbstractInterruptibleChannel" seems to be doing this, and the comments/javadocs offer some hint. As to why they're designed this way, that's a good question.
by marginalia_nu 4y ago
"AbstractInterruptibleChannel" seems to be doing this, and the comments/javadocs offer some hint. As to why they're designed this way, that's a good question.
https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/...
- pron 4y agoIt's important for sockets, less so for files, but they inherit that behaviour from the specification of the interface (https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/nio/channels/InterruptibleChannel.html https://docs.oracle.com/en/java/javase/19/docs/api/java.base...). See an old discussion about that here: https://mail.openjdk.org/pipermail/nio-dev/2018-February/004756.html https://mail.openjdk.org/pipermail/nio-dev/2018-February/004...