Date: Sun, 28 May 2023 17:23:01 +0200
On 28/05/2023 17.04, Federico Kircheis via Std-Proposals wrote:
> This code is racy, even with the internal mutex:
>
> if(container.empty()){
> container.insert(....)
> }
Right. Java started with synchronized containers
back when it was at version 1.0, but since then,
it was discovered that the interface layer of a
single container is rarely the adequate abstraction
for a thread-safe data structure.
Jens
> This code is racy, even with the internal mutex:
>
> if(container.empty()){
> container.insert(....)
> }
Right. Java started with synchronized containers
back when it was at version 1.0, but since then,
it was discovered that the interface layer of a
single container is rarely the adequate abstraction
for a thread-safe data structure.
Jens
Received on 2023-05-28 15:23:04