Structured concurrency proposal for C++20

Florian Weimer fweimer at
Tue Mar 5 15:21:01 UTC 2019

* Volkan Yazıcı:

> [Quoting from Trio from post
> <>
> .]
> "There’s a really interesting proposal under consideration for C++20,
> that’s highly relevant to us here: (PDF), draft
> implementation <>. According to Herb
> Sutter
> <>,
> the proposal is “design-approved”, and the hope is that the exact wording
> will be formally approved in July."

I'm not sure this proposal is feasible from an architecture perspective
because it requires duplicating all blocking interfaces.  The proposal
provides this just for a single blocking operation, a modified condition
variable.  This is not sufficient for promptly releasing resources when
a stop request is received, so it does not solve the hard problems
related to thread termination.  A thread can stop waiting on the
condition variable when the stop request comes in, but there is no
mechanism to ensure that the resources that are used to eventually
signal the condition variable are no longer spent.  That operation still
happens unperturbed, and upon completion the signal will simply be
delivered into nothingness.


More information about the loom-dev mailing list