Structured concurrency
Structured concurrency is a concurrency model that scopes related concurrent tasks within a hierarchy so their lifetimes and failures are managed together.
Kotlin in Action, 2E
Structured concurrency is a concurrency model that scopes concurrent tasks so their lifetimes and failures are managed through a shared parent-child hierarchy.
- How it is used
- Organizes Kotlin coroutine work into cancellable, trackable hierarchies for concurrent application operations.
- How deep it goes
- Develops scopes, Job-based hierarchy, cancellation, contexts, and error propagation; defers detailed exception behavior to later treatment.
- Examples
- Uses concurrent image loading, nested launch and delay tasks, and a heartbeat beside a failing coroutine.
- What you can do after
- Apply it via Kotlin coroutine scopes to decompose work, tie tasks to lifecycles, and choose failure boundaries.
Read how Kotlin in Action, 2E explains structured concurrency →
Microservices Patterns, Second Edition
Structured concurrency is a concurrency model that scopes concurrent tasks within a well-defined lifetime and hierarchy.
- How it is used
- Supports maintainable, performant, scalable API composers coordinating provider-service calls.
- How deep it goes
- Defines scoped task management but does not detail its implementation.
- Examples
- Uses findOrder to illustrate parallel calls to independent providers and sequential calls when results depend on one another.
- What you can do after
- Evaluate structured concurrency as an option for managing parallel and sequential provider calls in an API composer.
Read how Microservices Patterns, Second Edition explains structured concurrency →
Related concepts
- coroutineuses · A coroutine is a computation that can suspend and later resume execution while retaining its state, enabling cooperative transfer of control.
- coroutine hierarchyconfigures · A coroutine hierarchy is a parent-child organization of coroutines through which execution lifetimes and failures can be related.
- reactive architecturealternative to · Reactive architecture is a software architecture organized around asynchronous, nonblocking communication and processing that responds to events over time.
- coroutine scopeconfigured by · A coroutine scope is a Kotlin abstraction that groups coroutines under a shared context and lifecycle, coordinating their execution and completion.
- coroutine contextused by · A coroutine context is a collection of elements providing contextual information, such as execution, naming, job, and error-handling information, to a coroutine.
Questions about structured concurrency
What is structured concurrency?
Structured concurrency is a concurrency model that scopes related concurrent tasks within a hierarchy so their lifetimes and failures are managed together.
Which Manning books explain structured concurrency?
Kotlin in Action, 2E and Microservices Patterns, Second Edition.
What is the difference between structured concurrency and GlobalScope?
Structured concurrency is a concurrency model that scopes related concurrent tasks within a hierarchy so their lifetimes and failures are managed together. GlobalScope is a Kotlin coroutine scope whose lifetime is independent of structured parent scopes and generally extends for the application’s lifetime.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

