# TaskRunner.RunAll

```go
func (*TaskRunner) RunAll(ctx context.Context) error
```

Run the runner until there are no more tasks available.

Use `RunAll` for finite worker processes and local draining workflows. Use [`RunForever`](/docs/api-reference/go/workflows/TaskRunner.RunForever) for long-running runners.

## Parameters

**ctx**

`context.Context`

required: true

The context controlling the runner lifetime.

## Returns

An error if the polling loop fails.

```go title="Go"
if err := runner.RunAll(ctx); err != nil {
    return err
}
```
