Should java/nio/channels/spi/AbstractInterruptibleChannel.java#isOpen be synchronized ?
Sean Chou
zhouyx at linux.vnet.ibm.com
Tue Dec 4 02:53:04 PST 2012
Hello,
I found AbstractInterruptibleChannel.close() is synchronized
using closeLock, but isOpen() is not synchronized. Javadoc of isOpen() says
"Returns: true if, and only if, this channel is open". I want to know
if isOpen() method is designed not to synchronize with closeLock ? Because
in close() method the closeLock embraces "open = false;" and
" implCloseChannel(); " , which looks like the open variable should always
reflect the real state.
--
Best Regards,
Sean Chou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121204/72d79747/attachment.html
More information about the nio-dev
mailing list