RFR [8058099] (ch) Cleanup in FileChannel/FileDispatcher native implementation [win]
Ivan Gerasimov
ivan.gerasimov at oracle.com
Tue Sep 23 14:53:28 UTC 2014
Thank you Alan!
> AsynchronousFileChannel needs to open files with FILE_FLAG_OVERLAPPED
> enabled because it supports asynchronous operations. FileChannel does
> not use this flag because it is synchronous. The method that throws
> the exception for you is tryLock which is synchronous and is the same
> code for both channel types. So it was correct for it to handle
> ERROR_IO_PENDING.
>
It's not that clear from MSDN whether UnlockFileEx() can ever report
ERROR_IO_PENDING.
However, it does say that it's able to work asynchronously.
I think it would be safer to add the check for ERROR_IO_PENDING. Here's
the updated webrev:
http://cr.openjdk.java.net/~igerasim/8058099/1/webrev/
The rest is the same as before.
> Ivan - I think you are good to go.
>
Thanks! Would you please review this small addition to release0()?
Sincerely yours,
Ivan
More information about the nio-dev
mailing list