AsynchronousFileChannel.open() - is it blocking?
Alan.Bateman at oracle.com
Fri Mar 2 00:46:43 PST 2012
On 01/03/2012 22:52, Zhong Yu wrote:
> Is open() a potentially blocking action? Apparently so because some
> sanity checking (e.g. existence of the file) requires disk spin. If
> that's the case, it should probably be explicitly documented.
> And after open(), are following methods blocking or non-blocking?
The asynchronous operations defined by AsynchronousFileChannel are read,
write, and lock. The other methods, including the open method to create
or open the file, are synchronous and potentially blocking.
More information about the nio-dev