[Jsr308-statements] Re: [JSR308] Concurrency annotations on blocks

Eugene Kuleshov eu at javatx.org
Tue Feb 6 17:19:33 EST 2007


Brian Goetz wrote:
> Thanks for posting a concrete, practical use case surrounding
> annotations on synchronized blocks.
>
> The case you offer fits into a more general category, systems where the
> bytecode that comes out of the javac compiler is not the final code that
> gets executed, but instead the input to the next stage of compiler.  In
> that case, these annotations serve as #pragmas to the next-stage
> compiler.  Another example in the same general category would be
> specifying join points in an aspect framework.
  I would like to add to that, that such compilation is not necessary 
applies to only the block boundaries (i.e. changing synchronize to 
something else), but whole block body can be changed. For example, all 
state access/modification can be scoped/serialized and only made visible 
to the other processes at the exiting from such block (i.e. to provide 
optimistic concurrency in the distributed environment). In such use case 
closures won't really help.

  regards,
  Eugene





More information about the Jsr308-statements mailing list