Show / Hide Table of Contents

Struct CancellationTokenMultiplexer.ScopeWithTimeout

Represents a scope that controls the lifetime of the multiplexed cancellation token and allows to specify the timeout.

Implements
IMultiplexedCancellationTokenSource
IDisposable
IAsyncDisposable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public readonly struct CancellationTokenMultiplexer.ScopeWithTimeout : IMultiplexedCancellationTokenSource, IDisposable, IAsyncDisposable

Properties

View Source

CancellationOrigin

Gets the cancellation origin.

Declaration
public CancellationToken CancellationOrigin { get; }
Property Value
Type Description
CancellationToken
View Source

IsTimedOut

Gets a value indicating that the multiplexed token is canceled by the timeout.

Declaration
public bool IsTimedOut { get; }
Property Value
Type Description
bool
View Source

Timeout

Sets the optional timeout.

Declaration
public TimeSpan Timeout { set; }
Property Value
Type Description
TimeSpan
See Also
CombineAndSetTimeoutLater(params ReadOnlySpan<CancellationToken>)
View Source

Token

Gets the multiplexed token.

Declaration
public CancellationToken Token { get; }
Property Value
Type Description
CancellationToken

Methods

View Source

Dispose()

Declaration
public void Dispose()
View Source

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask

Implements

IMultiplexedCancellationTokenSource
IDisposable
IAsyncDisposable

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾