AsyncSerialExecutor<TResult> Class

Definition

A utility class that provides serial execution of async functions. In can be used inside reentrant grain code to execute some methods in a non-reentrant (serial) way.

public class AsyncSerialExecutor<TResult>
type AsyncSerialExecutor<'Result> = class
Public Class AsyncSerialExecutor(Of TResult)

Type Parameters

TResult

The underlying type returned from functions invoked by this executor.

Inheritance
AsyncSerialExecutor<TResult>

Constructors

AsyncSerialExecutor<TResult>()

Methods

AddNext(Func<Task<TResult>>)

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.

Applies to