Re: ConcurrentHashMap's clear() may make size() always incorrent

Martin Buchholz via Concurrency-interest <[email protected]> Sun, 19 Jul 2020 07:41:14 -0700
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <CA+kOe08c+bJ77PnLt5T=oQ5ceikr8z195CBxS1wywFSXvZmpgw@mail.gmail.com>
The principle is that:
- global operations like size() must be correct in a quiescent map.
- When non-quiescent, we cannot succeed but we try to return a good estimate.

On Sun, Jul 19, 2020 at 6:32 AM Liu via Concurrency-interest
<[email protected]> wrote:
>
> Well, consider of the possibility of races, maybe
> there is no way to imporve it.
>
> Result of any operations can be obsolete, because of races.
> _______________________________________________
> Concurrency-interest mailing list
> [email protected]
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest