Attaches a cancellation token to the pending next-value operation.
Declared in <folly/coro/AsyncGenerator.h>
NextSemiAwaitable
co_withCancellation(
CancellationToken cancelToken,
NextSemiAwaitable&& awaitable);
The semi-awaitable carrying the cancellation token.
| Name | Description |
|---|---|
| cancelToken | The cancellation token to attach. |
| awaitable | The semi-awaitable to attach the token to. |