C++ Logo


Advanced search

Re: [std-proposals] Fwd: set_new_handler extension

From: Phil Bouchard <boost_at_[hidden]>
Date: Wed, 31 May 2023 22:55:38 -0400
On 5/31/23 22:48, Thiago Macieira wrote:
> On Wednesday, 31 May 2023 19:44:10 PDT Phil Bouchard wrote:
>>> In other words, we need a std::lock_guard or equivalent. How is this
>>> different from a regular mutex? This is a very simple example and yet
>>> we've already got ourselves a mutex and needing to think about which
>>> operations need to be protected so the state doesn't change from under
>>> us.
>> This example shows what I had in mind:
>> https://github.com/philippeb8/std__ts/blob/master/ts.cpp
> You didn't address my point, that this simple solution required a mutex and
> reasoning what the critical section span should be. How is this any different,
> let alone safer, from what we already have?

My reasoning is:
- This brings parallel programming to a higher level of abstraction (the
definition of intelligence actually);
- It prevents the whole planet from reinventing the wheel;
- This *removes* race conditions, it can't add any runtime bugs in any way.

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 02:55:40