C++ Logo

std-proposals

Advanced search

Re: [std-proposals] void std::optional<T>::abandon(void) noexcept

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Tue, 28 Nov 2023 16:07:11 +0100
Il 28/11/23 15:59, Frederick Virchanza Gotham via Std-Proposals ha scritto:
> Occasionally a thread freezes up . . . . and rather than have the
> frustration of having to close and re-open the program, I just abandon
> the thread. Obviously this would get hairy if a thread froze up every
> 20 seconds, but it rarely happens -- more like once or twice a day.

There's no solution to this problem in C++. If you risk crashes or
similar, you use multiprocess, not multithreading. Proposing library
hacks does not sound reasonable.

My 2 c,
-- 
Giuseppe D'Angelo

Received on 2023-11-28 15:07:15