# AsyncSerialExecutor&lt;TResult&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.asyncserialexecutor-1/)

## AddNext(Func&lt;Task&lt;TResult&gt;&gt;) {#addnext-system-func-system-threading-tasks-task-tresult-b760c4bf}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.asyncserialexecutor-1/methods/addnext-system-func-system-threading-tasks-task-tresult-b760c4bf/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/Async/AsyncSerialExecutor.cs#L59-L63)

```csharp
public Task<TResult> AddNext(Func<Task<TResult>> func)
```

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.

### Parameters

- `func` (`Func<Task<TResult>>`): The function to schedule for invocation.

### Returns

The result of the scheduled function invocation.
