[concurrency-interest] Java7 Fences API

Gregg Wonderly gregg at cytetech.com
Wed Jan 14 14:27:00 EST 2009


Doug Lea wrote:
> Gregg Wonderly wrote:
>> Doug Lea wrote:
>>> 1. Macros. If there were a standard Java Macro preprocessor,
>>> someone might introduce some (using C style for now):
>>>    #define publish(v, r) preStoreFence(); v = r
>>>
>> What about annotation style notations?
>
> I haven't been able to come up with an annotation scheme
> that works here, and don't think one is possible, since
> the annotation targets are sometimes assignment statements,
> which cannot be independently annotated.

You were suggesting some language changes or other tooling changes, so I was 
suggesting annotations as something that wouldn't require keyword reuse or other 
weirdness like that.   Instead, allow annotations on statements (which has no 
compatibility issues) and we are done.

Gregg Wonderly


More information about the Concurrency-interest mailing list