[concurrency-interest] "happens-before" on NIO2 between read/write operation and CompletionHandler call

Pedro Felix pmhsfelix at gmail.com
Mon Nov 18 05:21:56 EST 2019


Hi,

Does NIO2 ensures a "happens-before" relation between an
AsynchronousByteChannel (ASB) read/write action and the first action in the
CompletionHandler "completed" method?
I've looked in the javadoc documentation and didn't found any mention of
"happens-before" being ensured.

Since NIO2 (presumably) needs to ensure that all writes into the read
ByteBuffer are visible to the first first action on the handler "completed"
method, I would assume all writes before the ASB.read call operation are
also visible.

Thanks,
Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20191118/d622f990/attachment.html>


More information about the Concurrency-interest mailing list