# AsyncSerialExecutor Methods

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

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

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

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

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

Submits 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>`): The function to schedule for invocation.

### Returns

The result of the scheduled function invocation.
