Class CancellationTokenMultiplexer
Represents cancellation token multiplexer.
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public sealed class CancellationTokenMultiplexer
Remarks
The multiplexer provides a pool of CancellationTokenSource to combine the cancellation tokens.
Properties
| Edit this page View SourceMaximumRetained
Gets or sets the maximum retained CancellationTokenSource instances.
Declaration
public int MaximumRetained { get; init; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceCombine(ReadOnlySpan<CancellationToken>)
Combines the multiple tokens.
Declaration
public CancellationTokenMultiplexer.Scope Combine(ReadOnlySpan<CancellationToken> tokens)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<CancellationToken> | tokens | The tokens to be combined. |
Returns
Type | Description |
---|---|
CancellationTokenMultiplexer.Scope | The scope that contains a single multiplexed token. |