C++ Logo


Advanced search

Re: [std-proposals] Fwd: set_new_handler extension

From: Phil Bouchard <boost_at_[hidden]>
Date: Thu, 1 Jun 2023 10:44:53 -0400
On 6/1/23 10:41, Sebastian Wittmeier via Std-Proposals wrote:
> What code would we write (with the lock behind the scenes) that the
> compiler does
> container.push_back(1);
> // the container should be locked here
> container.push_back(2);
> // the container should not be locked here
> container.push_back(3);
> with no other thread inserting or deleting in between 1 or 2, but
> possibly before 3?
> Or does it analyze and know that automatically?

No, that would be the algorithmic level where the compiler wouldn't
interfere at all.

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>
8 rue de la Baie| Gatineau (Qc), J8T 3H3 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 2023-06-01 14:44:54