C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Helper class to make safe a thread-unsafe class

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 29 Jun 2023 07:48:20 +0100
On Thu, 29 Jun 2023, 06:51 Federico Kircheis via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

>
> PS: I think there is a similar classes in a paper, I'm not able to find
> it right now.
>

As already discussed, it's synchronized_value in the Concurrency TS V2.
It's sorted by gcc already.

This entire thread is giving me deja vu. The idea of locking on every
access has already been discussed and rejected as the wrong granularity
(and the committee will not approve such misguided proposals). The idea of
a locked value with an accessor taking a callable to operate on the value
is already in a C++ TS.

Received on 2023-06-29 06:48:38