Concurrent Programming with Effect Handlers
Browse cluster: OCaml Systems and Utilities →This is a tutorial on concurrent programming using algebraic effect handlers in OCaml. The project teaches effect handlers through guided examples and exercises, starting with basics like error recovery and progressing through topics including shallow versus deep handlers, delimited continuations, generators, cooperative concurrency, and asynchronous I/O. It was originally written as course materials for the CUFP 17 tutorial and is built with OCaml 5.4.1 (or later) using the Dune build system, leveraging the Effect module from OCaml's standard library to demonstrate how algebraic effects provide a unified abstraction for exceptions, generators, asynchronous operations, and concurrent programming patterns.