Fwd: Thread interruption while reading from a ZipFS entry will close the entire FS
Bruno Ploumhans
bruno.ploumhans at gmail.com
Sat Apr 13 16:09:21 UTC 2024
> (maybe StandardOpenOption.UNINTERRUPTIBLE)
That sounds reasonable. `Files.newInputStream` already chooses to make
the input stream uninterruptible. Should it ignore the option then? Or
forward it, potentially breaking code that is not passing the option
but expecting the channel to be uninterruptible?
If there is a well-specified API for uninterruptible channels, it
might be worth moving the logic for `beginBlocking` and `endBlocking`
to `AbstractInterruptibleChannel`. This raises the question of how a
child class should set `uninterruptible`, and if it should be settable
later.
More information about the nio-dev
mailing list