[concurrency-interest] Javadoc for ConcurrentSkipListMap.computeIfAbsent()
oleksandr.otenko at gmail.com
Mon Feb 24 04:43:17 EST 2020
Define "present" / "not present".
In a concurrent setting the boolean outcome of the function does not imply
anything about how it decided that. In particular, was it seen "not
present", but lost the race to set the new value.
On Mon, 24 Feb 2020, 04:57 Roman Leventov via Concurrency-interest, <
concurrency-interest at cs.oswego.edu> wrote:
> It says: "The function is NOT guaranteed to be applied once atomically
> only if the value is not present."
> It's hard to parse this sentence, and it seems to me to make little
> sense since when the value is present, the function is not applied at all.
> IMO it would be better to remove the last part "only if the value is not
> present", making it equal to the corresponding sentence in compute() and
> computeIfPresent() Javadocs.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest