java.nio.*Buffer read/write atomicity (original) (raw)

mark.reinhold at oracle.com mark.reinhold at oracle.com
Thu Dec 20 17:11:34 UTC 2012


2012/12/19 12:37 -0800, david.holmes at oracle.com:

If multiple threads have to synchronize access to the buffer then the reads/writes do not need to be atomic. Atomicity is only needed when data races are allowed.

Correct.

Byte buffers, especially the direct variety, are all about performance. Making operations upon them atomic is not a problem that needs to be solved.



More information about the core-libs-dev mailing list