- Future — a value representing a computation that hasn’t finished yet
- Poll — checking a future once to see if it’s done (
Ready) or not (Pending)
- Waker — a callback the future uses to tell the executor “I’m ready to be polled again”. When a future returns
Pending, it’s removed from the ready queue — the waker is what puts it back when progress can be made
- Executor — the thing that polls futures and decides which task to run next
- Task — a spawned future being managed by the executor
- Yield point — an
.await where a task can be suspended and control returned to the executor
- Cooperative multitasking — tasks voluntarily give up control at yield points, rather than being forcibly interrupted