CancellationScope Type
A scope of cancellation: a CancellationTokenSource that is cancelled when the token
it is linked to is, and can be cancelled on its own without cancelling that token. Begun by
Cancellation.within and Cancellation.timeout, and disposed when their effect ends, so each source
lives exactly as long as the effects that use it.
It is the ICancellationProvider of the effects in the scope, so an environment grows in it by providing it as its source.
Record fields
| Record Field |
Description
|
|
|
Instance members
| Instance member |
Description
|
|
The token the scope is linked to.
|
Static members
| Static member |
Description
|
Full Usage:
CancellationScope.LinkedTo(token)
Parameters:
CancellationToken
-
The token whose cancellation cancels the scope.
Returns: CancellationScope
|
Begins a scope linked to token, already cancelled if the token is. Whoever begins it disposes it.
|
Full Usage:
CancellationScope.NestedIn(source)
Parameters:
CancellationTokenSource
-
The source whose cancellation cancels the scope.
Returns: ValueTask<CancellationScope>
|
Begins a scope nested in source: the
|
Orsak