tmp/tmpipb9yle6/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
#### Resumption <a id="coroutine.handle.resumption">[[coroutine.handle.resumption]]</a>
|
| 2 |
|
| 3 |
Resuming a coroutine via `resume`, `operator()`, or `destroy` on an
|
| 4 |
execution agent other than the one on which it was suspended has
|
| 5 |
-
implementation-defined behavior unless each execution agent either is
|
| 6 |
-
instance of `std::thread` or `std::jthread`, or is the thread that
|
| 7 |
executes `main`.
|
| 8 |
|
| 9 |
[*Note 1*: A coroutine that is resumed on a different execution agent
|
| 10 |
should avoid relying on consistent thread identity throughout, such as
|
| 11 |
holding a mutex object across a suspend point. — *end note*]
|
| 12 |
|
| 13 |
-
[*Note 2*: A concurrent resumption of the coroutine
|
| 14 |
data race. — *end note*]
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
void operator()() const;
|
| 18 |
void resume() const;
|
|
|
|
| 1 |
#### Resumption <a id="coroutine.handle.resumption">[[coroutine.handle.resumption]]</a>
|
| 2 |
|
| 3 |
Resuming a coroutine via `resume`, `operator()`, or `destroy` on an
|
| 4 |
execution agent other than the one on which it was suspended has
|
| 5 |
+
*implementation-defined* behavior unless each execution agent either is
|
| 6 |
+
an instance of `std::thread` or `std::jthread`, or is the thread that
|
| 7 |
executes `main`.
|
| 8 |
|
| 9 |
[*Note 1*: A coroutine that is resumed on a different execution agent
|
| 10 |
should avoid relying on consistent thread identity throughout, such as
|
| 11 |
holding a mutex object across a suspend point. — *end note*]
|
| 12 |
|
| 13 |
+
[*Note 2*: A concurrent resumption of the coroutine can result in a
|
| 14 |
data race. — *end note*]
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
void operator()() const;
|
| 18 |
void resume() const;
|