DataflowBlock.OutputAvailableAsync<TOutput> Method (ISourceBlock<TOutput>, CancellationToken)
Provides a Task<TResult> that asynchronously monitors the source for available output.
Assembly: System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)
public static Task<bool> OutputAvailableAsync<TOutput>( this ISourceBlock<TOutput> source, CancellationToken cancellationToken )
Specifies the type of data contained in the source.
- Type: System.Threading.Tasks.Dataflow.ISourceBlock<>
The source to monitor.
- Type: System.Threading.CancellationToken
The cancellation token with which to cancel the asynchronous operation.
Return ValueType: System.Threading.Tasks.Task<Boolean>
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. If it returns false, more output is not and will never be available, due to the source completing prior to output being available.