Traditional approaches to concurrency and asynchronous programming, such as futures or threads, can be difficult to use safely, particularly in the presence of exceptions. These abstractions often implicitly introduce concurrency to your program in an unstructured way making it difficult to reason about your code.
The principle of “structured concurrency” aims to do for concurrent/async programming what constructs like if/while/for did for control-flow and what destructors and RAII did for object lifetimes - provide a structured way to think about concurrency in your programs by encapsulating common concurrency patterns into reusable algorithms.
This talk covers using the principles of “structured concurrency” in conjunction with coroutines to make it easier to write concurrent programs that are safer and more efficient than traditional approaches.