
Sign up to save your podcasts
Or


Composing Schedulers using Effect Handlers
Deepali Ande (IIT Madras)
OCaml 5 introduces effect handlers as a mechanism for con- current programming. With effect handlers, concurrency can be expressed in direct-style rather than in monadic-style as in Lwt and Async. Rather than baking in the notion of a thread scheduler, the compiler exposes delimited continuations, with the idea that different libraries may implement their own concurrency primitive, with their own schedulers. Under this setting, given that the notion of a concurrent task is tied to a particular scheduler, it is challenging to allow tasks from different schedulers to interact with each other. If this problem is not solved, the ecosystem runs the risk of repeating the schism between Lwt and Async in OCaml today.
By Composing Schedulers using Effect Handlers
Deepali Ande (IIT Madras)
OCaml 5 introduces effect handlers as a mechanism for con- current programming. With effect handlers, concurrency can be expressed in direct-style rather than in monadic-style as in Lwt and Async. Rather than baking in the notion of a thread scheduler, the compiler exposes delimited continuations, with the idea that different libraries may implement their own concurrency primitive, with their own schedulers. Under this setting, given that the notion of a concurrent task is tied to a particular scheduler, it is challenging to allow tasks from different schedulers to interact with each other. If this problem is not solved, the ecosystem runs the risk of repeating the schism between Lwt and Async in OCaml today.