Edit

Share via


AsyncSerialExecutor<TResult>.AddNext Method

Definition

Submit the next function for execution. It will execute after all previously submitted functions have finished, without interleaving their executions. Returns a promise that represents the execution of this given function. The returned promise will be resolved when the given function is done executing.

public System.Threading.Tasks.Task<TResult> AddNext (Func<System.Threading.Tasks.Task<TResult>> func);
member this.AddNext : Func<System.Threading.Tasks.Task<'Result>> -> System.Threading.Tasks.Task<'Result>
Public Function AddNext (func As Func(Of Task(Of TResult))) As Task(Of TResult)

Parameters

func
Func<Task<TResult>>

The function to schedule for invocation.

Returns

Task<TResult>

The result of the scheduled function invocation.

Applies to