ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
548 stars 66 forks source link

Move Waiters out of Eio_core #567

Closed talex5 closed 1 year ago

talex5 commented 1 year ago

The only thing using the old Waiters module in the core was Switch, but that can be implemented more efficiently with Single_waiter anyway, which the first commit does. The second commit moves Waiters out of core, so that it's not exposed at all to users of Eio (it was previously in Eio.Private). It also moves Hook out of core (Waiters is the only user of it).

This helps with #544 (by simplifying the core) and #382 (by removing another user of Waiters).