DataflowBlock.OutputAvailableAsync Method

Definition

Overloads

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

Provides a Task<TResult> that asynchronously monitors the source for available output.

C#
public static System.Threading.Tasks.Task<bool> OutputAvailableAsync<TOutput>(this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source, System.Threading.CancellationToken cancellationToken);

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source to monitor.

cancellationToken
CancellationToken

The cancellation token with which to cancel the asynchronous operation.

Returns

A Task<TResult> that informs of whether and when more output is available. If, when the task completes, its Result is true, more output is available in the source (though another consumer of the source may retrieve the data). If it returns false, more output is not and will never be available, due to the source completing prior to output being available.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
UWP 10.0

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

Provides a Task<TResult> that asynchronously monitors the source for available output.

C#
public static System.Threading.Tasks.Task<bool> OutputAvailableAsync<TOutput>(this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source);

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source to monitor.

Returns

A Task<TResult> that informs of whether and when more output is available. If, when the task completes, its Result is true, more output is available in the source (though another consumer of the source may retrieve the data).

If it returns false, more output is not and will never be available, due to the source completing prior to output being available.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
UWP 10.0