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

√iktor Ҡlang viktor.klang at gmail.com
Tue Nov 27 13:08:07 EST 2012


On Tue, Nov 27, 2012 at 7:01 PM, Doug Lea <dl at cs.oswego.edu> wrote:

> On 11/27/12 12:51, √iktor Ҡlang wrote:
>
>> So how would I use it within Akka for instance? (embed jsr166 and accept
>> potential duplicate definitions?)
>>
>
> You'll need to wait for a JVM (or preliminary build) that supports it,
> and then import sun.misc.Contended. That is one reason to place this
> in a JVM-dependent package -- the annotation does you no good
> without JVM support.
>

I'd say that it serves as a hint to the JVM that padding would help if
possible, so there wouldn't be a strict need to enforce that it is used. It
would be nice to be able to ship the same code for different JDKs.

Cheers,
√


>
> -Doug
>
>
>
>> Cheers,
>>>>
>> On Tue, Nov 27, 2012 at 6:40 PM, Doug Lea <dl at cs.oswego.edu
>> <mailto:dl at cs.oswego.edu>> wrote:
>>
>>
>>     Aleksey has been making progress on a hotspot implementation of
>>     the @Contended annotation. While this progresses, we'd also
>>     like continued feedback about the java-level information, guidance,
>>     examples, etc.
>>
>>     As a compromise that helps avoid controversy about its status
>>     and specs, the @Contended annotation itself will probably be placed
>>     in sun.misc, not java.util.concurrent.*. A staging version of
>>     Contended.java is in our CVS though, with javadoc at:
>>
>>     http://gee.cs.oswego.edu/dl/__**jsr166/src/dl/sun/misc/sun/__**
>> misc/Contended.html<http://gee.cs.oswego.edu/dl/__jsr166/src/dl/sun/misc/sun/__misc/Contended.html>
>>
>>     <http://gee.cs.oswego.edu/dl/**jsr166/src/dl/sun/misc/sun/**
>> misc/Contended.html<http://gee.cs.oswego.edu/dl/jsr166/src/dl/sun/misc/sun/misc/Contended.html>
>> >
>>
>>     Any comments and suggestions will be welcome.
>>
>>     -Doug
>>
>>     ______________________________**___________________
>>     Concurrency-interest mailing list
>>     Concurrency-interest at cs.__oswe**go.edu <http://oswego.edu> <mailto:
>> Concurrency-interest@**cs.oswego.edu <Concurrency-interest at cs.oswego.edu>
>> >
>>     http://cs.oswego.edu/mailman/_**_listinfo/concurrency-interest<http://cs.oswego.edu/mailman/__listinfo/concurrency-interest>
>>
>>     <http://cs.oswego.edu/mailman/**listinfo/concurrency-interest<http://cs.oswego.edu/mailman/listinfo/concurrency-interest>
>> >
>>
>>
>>
>>
>> --
>> Viktor Klang
>>
>> Akka Tech Lead
>> Typesafe <http://www.typesafe.com/>- The software stack for applications
>> that scale
>>
>> Twitter: @viktorklang
>>
>>
>
>


-- 
Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - The software stack for applications
that scale

Twitter: @viktorklang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20121127/36e97ff3/attachment.html>


More information about the Concurrency-interest mailing list