Struct CancellationTokenMultiplexer.ScopeWithTimeout
Represents a scope that controls the lifetime of the multiplexed cancellation token and allows to specify the timeout.
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public readonly struct CancellationTokenMultiplexer.ScopeWithTimeout : IMultiplexedCancellationTokenSource, IDisposable, IAsyncDisposable
Properties
View SourceCancellationOrigin
Gets the cancellation origin.
Declaration
public CancellationToken CancellationOrigin { get; }
Property Value
| Type | Description |
|---|---|
| CancellationToken |
IsTimedOut
Gets a value indicating that the multiplexed token is canceled by the timeout.
Declaration
public bool IsTimedOut { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Timeout
Sets the optional timeout.
Declaration
public TimeSpan Timeout { set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
View SourceToken
Gets the multiplexed token.
Declaration
public CancellationToken Token { get; }
Property Value
| Type | Description |
|---|---|
| CancellationToken |
Methods
View SourceDispose()
Declaration
public void Dispose()
DisposeAsync()
Declaration
public ValueTask DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask |