---
title: Std.Async
---

Lightweight async/await built on top of the Actor model.

## Types

### Future

```saga
opaque type Future a
```

## Effects

### Async

```saga
effect Async {
  fun async : (f: Unit -> a) -> Future a
  fun await : (future: Future a) -> a
}
```

Async effect for spawning concurrent computations and awaiting their results.

## Handlers

### async_handler

```saga
handler async_handler for Async needs {Process, Actor a}
```

Default handler for Async that spawns an actor per async call.

## Functions

### all

```saga
fun all : (futures: List (Future a)) -> List a needs {Async}
```

Awaits all futures in order and collects the results into a list.

