Primitive Queue<any T> considerations

John Rose john.r.rose at
Thu Nov 19 00:26:58 UTC 2015

On Nov 18, 2015, at 4:01 PM, Vitaly Davidovich <vitalyd at> wrote:
> Right, by performance penalty I meant that I'd like to ask only for atomicity and not also ordering.  If the T is <= machine word, I'd like it to act just like if I hadn't requested atomicity.  In other words, I don't want fences here for ordering.

OK, check that.  So an atomic T is not the same as a Java-volatile T.
This is a reason *not* to reuse the "volatile" keyword for def-site atomicity,
and to consider a new keyword for use-site atomicity.

We won't provide keywords for all use cases, since wrappers are
expressive enough to fill the gaps (as in C++).  The most important
new expressive point (IMO) is opt-in, def-site, anti-tearing; that merits
something like a keyword, since it has security implications.

More information about the valhalla-dev mailing list