C++ Logo

std-proposals

Advanced search

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

From: Breno Guimarães <brenorg_at_[hidden]>
Date: Tue, 28 Nov 2023 12:22:32 -0300
When I spawn a thread and it freeze, I usually just debug my code.

Em ter., 28 de nov. de 2023 12:00, Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> escreveu:

> On Tue, Nov 28, 2023 at 2:37 PM Andrey Semashev wrote:
> >
> > When your thread unexpectedly blocks for unknown duration, your proposed
> > abandon() method is not the solution. Not in a "real world" program,
> > anyway. (In your toy project that noone will ever use you can do
> > whatever, but that doesn't necessitate changing the standard.)
>
>
> Not getting snotty with you Andrey but the program that I wrote, and
> which I'm currently tweaking, is currently being used by a dozen of my
> colleagues in five countries that I know of.
>
> 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.
>
> But this isn't about the one program that I wrote. I think in general
> an 'std::optional' should be able to abandon its object.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2023-11-28 15:22:45