[concurrency-interest] @Contended (JEP-142)

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Nov 29 04:48:11 EST 2012


On 11/28/2012 08:47 PM, Gregg Wonderly wrote:
> Also, in the grander scheme of things, if, annotations are "runtime",
> and if we extended their definitions, there could be a default method of
> "whenImplemented" and another of "whenMissing" for example, that the JVM
> could invoke.  The implementing JVMs/environments, could then modify the
> "default" version of these.  The defaults, might then print an
> appropriate log message so that users/developers would know when to
> expect appropriate enhancements.

That's an interesting (mis)use of default methods, not entirely sure if
that is even supported. Anyway, as much exotic as it is, thanks for that
thought anyway!

-Aleksey.

P.S. I would go for @Contended.whenMissing default { System.exit(1); }


More information about the Concurrency-interest mailing list