Structured Concurrency: Managing the Hierarchical Cancelation and Error Handling
summary
Explains structured concurrency by showing concrete implementations and failure modes: a reusable EasyRacer obstacle course server plus clients in Java Loom, Kotlin coroutines, and Scala compare JP-453 structured task scope APIs, effect libraries, and direct-style DSLs; demonstrates races that cancel losers, resource cleanup with try-with-resources, hedging and Scoped Values for request IDs, error containment, and a stress test of 10,000 concurrent connections that reliably cancels the rest when one wins.
AI-written summary · about
chapters (13)
- 0:00Introduction to concurrency
- 3:02The concept of racing
- 5:17Obstacle course demonstrations
- 8:21High-level concurrency approaches
- 11:09Basic racing implementation
- 14:33Concurrent task racing
- 18:17Error handling in scopes
- 21:22High-concurrency techniques
- 22:36Implementing timeouts
- 26:10Managing resources
- 33:07Using scoped values
- 38:09Request hedging pattern
- 45:59Many-to-many concurrency
related talks
54mStructured Concurrency: Hierarchical Cancellation & Error Handling
01h 02mStructured Concurrency: Managing the Hierarchical Cancelation and Error Handling
45mTaming the Chaos - Structured Concurrency
57mStructured Concurrency in Java
43mStructured Concurrency in Java - The What and the Why
32mStructured Concurrency: The paradigm shift
41mStructured Concurrency in Java: The What & Why
01h 21mStructured Concurrency
