17 Language support library [language.support]

17.12 Coroutines [support.coroutine]

17.12.3 Class template coroutine_­handle [coroutine.handle]

17.12.3.4 Resumption [coroutine.handle.resumption]

Resuming a coroutine via resume, operator(), or destroy on an execution agent other than the one on which it was suspended has implementation-defined behavior unless each execution agent either is an instance of std​::​thread or std​::​jthread, or is the thread that executes main.
Note
:
A coroutine that is resumed on a different execution agent should avoid relying on consistent thread identity throughout, such as holding a mutex object across a suspend point.
— end note
 ]
Note
:
A concurrent resumption of the coroutine may result in a data race.
— end note
 ]
void operator()() const; void resume() const;
Requires: *this refers to a suspended coroutine.
Effects: Resumes the execution of the coroutine.
If the coroutine was suspended at its final suspend point, behavior is undefined.
void destroy() const;
Requires: *this refers to a suspended coroutine.
Effects: Destroys the coroutine ([dcl.fct.def.coroutine]).