IAsyncTarget<T>
Namespace: SnowBank.Linq.Async · interface
Defines a target that receive items and can throttle the producer
Methods
OnCompleted
void OnCompleted()
Notifies the target that the producer is done and that no more values will be published
OnError
void OnError(ExceptionDispatchInfo error)
Notifies the target that tere was an exception, and that no more values will be published
error— The error that occurred
OnNextAsync
Task OnNextAsync(T value, CancellationToken ct)
Push a new item onto the target, if it can accept one
value— New value that is being publishedct— Cancellation token that is used to abort the call if the target is blocked
Returns: Task that completes once the target has accepted the new value (or fails if the cancellation token fires)