Table of Contents

Class CancellationTokenTaskSource<T>

Namespace
Acuit.Pinpoint.IO
Assembly
Acuit.Pinpoint.IO.Abstractions.dll

Holds the task for a cancellation token, as well as the token registration. The registration is disposed when this instance is disposed.

public sealed class CancellationTokenTaskSource<T> : IDisposable

Type Parameters

T
Inheritance
CancellationTokenTaskSource<T>
Implements
Inherited Members

Constructors

CancellationTokenTaskSource(CancellationToken)

Creates a task for the specified cancellation token, registering with the token if necessary.

public CancellationTokenTaskSource(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token to observe.

Properties

Task

Gets the task for the source cancellation token.

public Task<T> Task { get; }

Property Value

Task<T>

Methods

Dispose()

Disposes the cancellation token registration, if any. Note that this may cause Task to never complete.

public void Dispose()