ConcurrentHashMap/ConcurrentMap/Map.compute (original) (raw)
Doug Lea dl at cs.oswego.edu
Fri Dec 14 11:08:56 PST 2012
- Previous message: ConcurrentHashMap/ConcurrentMap/Map.compute
- Next message: ConcurrentHashMap/ConcurrentMap/Map.compute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/14/12 13:27, Brian Goetz wrote:
Would be useful if you could dig up. Very often the problem is not an issue with a specific name, but their relationships, which mean they sometimes need to be considered as a group.
See September and October 2011 archives at: http://cs.oswego.edu/pipermail/concurrency-interest/ Plus a few scattered followups. On rescan I see that the sequence of events was first to support only computeIfAbsent. Then also a form of compute called recompute that initially didn't allow null arg or return so couln't be used for initialization or removal. Then changing this but adding computeIfPresent to better support update-only usage. Then merge was added months later to better handle groupBy etc.
Note that the only method you minimally need is compute. But the others avoid need for transient captures/lambdas, non-transparent effects, and extra work inside implementations. So it is likely in practice to be the least well used. In which case (sour grapes mode) having an odd name is not so bad.
-Doug
- Previous message: ConcurrentHashMap/ConcurrentMap/Map.compute
- Next message: ConcurrentHashMap/ConcurrentMap/Map.compute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list