C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Forced stopping of RAII compliant execution threads. Destructors.

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 16 Jul 2023 21:05:54 -0700
On Saturday, 15 July 2023 08:13:39 PDT Yuri Petrenko via Std-Proposals wrote:
> It will be possible to determine whether we are in the
> destructor or not by the counter, increment the counter when entering the
> destructor prologue, decrement when exiting the epilogue, when it reaches
> zero, we begin to unwind the stack.

Please see the discussion on std::scope_fail on how this is actually more
difficult than it sounds, when coroutines are involved.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-07-17 04:05:56