Concurrency for Scalas
Concurrency in Scala is running tasks without blocking by using Futures, which represent a value that will arrive later, and streams for continuous data. Futures run on an ExecutionContext thread pool, and libraries such as Akka Streams or fs2 add back-pressure so a fast producer cannot overwhelm a slow consumer.
Stage: Concurrency and Services · Part of the Scala roadmap · Last reviewed 19 November 2026
What to learn in Concurrency
- Start work with Future and compose results with map and flatMap
- Choose and configure an ExecutionContext
- Run Futures in parallel and combine them with Future.sequence
- Handle failed Futures using recover and recoverWith
- Explain why blocking inside a Future pool is harmful
- Describe back-pressure in a streaming pipeline
Concurrency interview questions
What does the ExecutionContext do for a Future?
It supplies the thread pool where the Future's body and its callbacks run. Passing a suitable context, often as a given, controls parallelism and lets you separate blocking work from CPU-bound work.
What is back-pressure in streams?
Back-pressure is a signal from a slow consumer telling the producer to slow down, so queues do not grow without bound and exhaust memory. Reactive Streams based libraries build this into the stream protocol.
Where Concurrency fits in the Scala roadmap
Concurrency belongs to the Concurrency and Services stage (advanced level), which takes about 21 hours. Run it.
Other units in this stage
Back to the full Scala roadmap