C++ Logo

std-proposals

Advanced search

Re: [std-proposals] exception_thread

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Mon, 18 Sep 2023 10:11:25 -0400
On Mon, Sep 18, 2023 at 2:00 AM Phil Bouchard via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
>
>
> On 9/18/23 01:54, Pavel Vazharov wrote:
> > Hi,
> >
> > We already have this (similar) facility in the standard via std::async -
> > https://godbolt.org/z/dTsbP1Ksx
>
> Interesting... thanks. The "thread" class is thus useless?

No, it's about having *choices*. The basic `thread` class is *basic*.
It creates a thread and calls your function in it. How you propagate
*anything* from that function (return values, exceptions, etc) is
entirely up to you.

Don't pay for what you don't use.

Received on 2023-09-18 14:11:37