[concurrency-interest] CHM#replace(key, null, newValue)

Tim Peierls tim at peierls.net
Wed Apr 2 08:55:43 EDT 2008

Maybe it's time to recycle Doug Lea's post on lazy initialization of map
values one more time. I've posted it on the Java Concurrency Wiki:



On Wed, Apr 2, 2008 at 8:12 AM, Dhanji R. Prasanna <dhanji at gmail.com> wrote:

> On Tue, Apr 1, 2008 at 8:44 PM, Peter Veentjer <alarmnummer at gmail.com>
> wrote:
> > It is a shame that the value to be placed in the hashmap can't be
> > created lazy.
> You could use a Future<T>. I think there was a thread some time ago
> discussing this (about a CHM.putIfAbsent(Callable)). The Future<T> was
> crazybob's idea on that thread.
> Dhanji.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20080402/51edd555/attachment.html 

More information about the Concurrency-interest mailing list