Elixir course

Elixir Level 6: Tasks & Agents

Tasks & Agents is level 6 of 16 of the LoWisa Elixir course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-25

Tasks

  • Task.async. Task.async runs a function concurrently: await joining the result with a timeout.
  • Task.async_stream. async_stream maps a collection concurrently with bounded workers: fan-out with backpressure built in.
  • Supervised tasks. Production tasks start under a Task.Supervisor: crashes contained, shutdown clean.

Agents

  • Agents. An Agent wraps state in a process: get and update through simple functions.
  • When agents fit. Agents suit simple shared state: counters, caches: anything smarter deserves a GenServer.
  • Bottleneck awareness. One agent serialises access: a hot agent is a bottleneck measured, then redesigned.

Managing Concurrent Work

  • Fan-out patterns. Fan out with tasks, join with await: partial failures handled per task, not ignored.
  • Timeout discipline. Every await carries a timeout: and a decision about what its expiry means.
  • Ownership of results. Concurrent design names one owner per piece of state: everyone else asks politely.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Elixir Level 6: Tasks & Agents cover?

Tasks, Agents, Managing Concurrent Work: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 5: Processes, which covers Processes, Messages, Links and Monitors.

Learn Elixir on your phone

The first level is free. LoWisa is on Google Play and the App Store.