FileChannel implements InterruptibleChannel, help or hindrance?
Alan Bateman
Alan.Bateman at oracle.com
Wed Feb 28 19:58:28 UTC 2018
On 28/02/2018 19:22, Brian Burkhalter wrote:
>
> Providing dynamic toggling of interruptibility would introduce
> complexity that we probably don’t want. The OpenOption approach is
> appealing but the InterruptibleChannel specification does not appear
> to admit much flexibility on this point:
>
> [Interrupting a thread] blocked in an I/O operation on an
> interruptible channel […] will cause the channel to be closed, the
> blocked thread to receive a |ClosedByInterruptException|
> <http://download.java.net/java/jdk10/docs/api/java/nio/channels/ClosedByInterruptException.html>,
> and the blocked thread's interrupt status to be set.
>
Yes, it would mean clarifications to allow that, maybe even an
isInterruptible method on this interface to allow for testing.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180228/fd60b304/attachment.html>
More information about the nio-dev
mailing list