Link Details

Link 148606 thumbnail
User 111696 avatar

By bloid
via cs.oswego.edu
Published: Jan 14 2009 / 02:41

The basic JSR133 JMM scheme provides three kinds of underlying ordering constaints, that are tied to variable declarations -- read-volatile, write-volatile, and write-final (aka write-release, aka publish, aka lazy-set), or for stand-alone AtomicX objects. This turns out not to mesh very well with the development of core concurrent algorithms (like the ones I tend to implement), where you often need these special flavors of reads and writes on an occasional basis, which is currently either impossible or insensible to achieve. As an example, the performance sensitive queues underlying ForkJoin require some critical write-releases of variables/array-slots during ownership transfer. These are slightly more expensive than normal (non-volatile/final) writes but much cheaper (in this context) than full write-volatile.
  • 13
  • 0
  • 1217
  • 447

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.