ICFP 2022
Sun 11 - Fri 16 September 2022 Ljubljana, Slovenia
Fri 16 Sep 2022 10:10 - 10:30 at M1 - OCaml 5.0 Chair(s): Matija Pretnar

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.

In this paper, we observe that the composability of effect handlers permits composability of schedulers. The key idea is that we can use effect handlers to define a uniform interface for suspending and resuming tasks, which is implemented by each of the schedulers. On top of this, we define scheduler-agnostic synchronization structures that allow tasks from different schedulers to interact. We also report on how this mechanism can be extended to capture the notion of task cancellation that extends across different schedulers

Fri 16 Sep

Displayed time zone: Belgrade, Bratislava, Budapest, Ljubljana, Prague change

09:00 - 10:30
OCaml 5.0OCaml at M1
Chair(s): Matija Pretnar University of Ljubljana, Slovenia
09:00
50m
Keynote
OCaml 5.0 - Concurrent and Parallel programming for OCaml
OCaml
KC Sivaramakrishnan IIT Madras and Tarides
Media Attached
09:50
20m
Talk
Multicoretests - Parallel Testing Libraries for OCaml 5.0
OCaml
Jan Midtgaard Tarides, Olivier Nicole Tarides, Nicolas Osborne Tarides
10:10
20m
Talk
Composing Schedulers using Effect Handlers
OCaml
Deepali Ande IIT Madras, KC Sivaramakrishnan IIT Madras and Tarides
Pre-print