[concurrency-interest] Interruptible I/O (was RE: enable / disable interrupt

Mark Thornton mthornton at optrak.co.uk
Sun Mar 30 11:46:31 EDT 2008


Hanson Char wrote:
> True.  But since any file or network operation ultimately involves 
> either an input or output stream, if a separate thread is scheduled to 
> execute upon a timeout to close the stream, any blocking in-flight 
> operations can be unblocked, and therefore "interruptable".  Right ?
>
> Hanson Char
>
> On Sun, Mar 30, 2008 at 1:34 AM, Mark Thornton <mthornton at optrak.co.uk 
> <mailto:mthornton at optrak.co.uk>> wrote:
>
>     David Holmes wrote:
>     > (Though for a long time there were issues - and maybe still are -
>     > because Java didn't expose the APIs to set timeouts in all
>     places that
>     > you'd want them. And the close() semantics took some effort to get
>     > right on all platforms.)
>     You still can't set time-outs on file operations, which is a pity
>     in the
>     case of network based files.
>
>     Mark Thornton
>
That is true of the nio based operations, but I think it was undefined 
for the original io classes. I seem to remember that there was at least 
one implementation where that approach did not work. Hopefully someone 
will be along to tell us which implementation that was and whether it is 
still true.

Mark Thornton


More information about the Concurrency-interest mailing list