hg: lambda/lambda/jdk: Summary: add ThreadLocal(Factory<T>) and compareAndSet methods
David Holmes
david.holmes at oracle.com
Tue Jul 31 05:48:58 PDT 2012
On 31/07/2012 10:41 PM, Aleksey Shipilev wrote:
> (sorry for double post, forgot to remove GPG signature)
>
> On 07/31/2012 04:10 PM, David Holmes wrote:
>> On 31/07/2012 8:35 PM, Aleksey Shipilev wrote:
>>> Please make sure you have both versions in place (i.e.
>>> updateAndGet/getAndUpdate). Also, while you are at it, can you also add
>>> the updaters for AtomicReference and friends?
>>
>> What do you mean? What can you do to a reference other than set it?
>
> Transform, given the current state? Trivial case:
>
> private class Holder {
> int x;
> int y;
> }
>
> private AtomicReference<Holder> holder = ...;
>
> holder.updateAndGet(h -> new Holder(h.x + 1, h.y + 1));
Ah I see. I'm still in old-think mode ;-)
David
-----
> Is this too much to ask? :)
>
> -Aleksey.
>
>
>
>
More information about the lambda-dev
mailing list