10. Coroutines
Laurel supports reasoning about concurrent programs encoded as cooperative coroutines. In this model, coroutine procedures can voluntarily suspend their execution, yielding control back to the caller. This concurrency model is chosen to support a wide range of upstream programming languages that make extensive use of generators, coroutines, and async/await constructs. The various design choices are explained below.