C++ Logo


Advanced search

Re: [std-proposals] High Performance Thread-Safe C++

From: Phil Bouchard <boost_at_[hidden]>
Date: Fri, 23 Feb 2024 13:06:39 -0500
On 2/23/24 13:03, Sebastian Wittmeier via Std-Proposals wrote:
> shared pointers perhaps help in the very simple find case.
> But say (still a simple example without multiple containers and without
> circular references) you want to display the first and last entry of a
> container, if its size is > 1; and the only entry, if its size is 1.
> Then you have to prevent any change on the container by other threads,
> between reading the size and reading the entries.
> Otherwise it could happen that you display the same entry twice.

Yeah so we need to add the definition of "locking scale"; either we lock
at the shared_ptr level, container level and/or semantic level.

Logo <https://www.fornux.com/>  
*Phil Bouchard*  facebook icon
Founder & CEO
T: (819) 328-4743
E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com>
320-345 de la Gauchetière Ouest| Montréal (Qc), H2Z 0A2 Canada
Banner <https://goglobalawards.org/> Le message ci-dessus, ainsi que les
documents l'accompagnant, sont destinés uniquement aux personnes
identifiées et peuvent contenir des informations privilégiées,
confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by
mistake please destroy all copies.

Received on 2024-02-23 18:06:39