ocaml-multicore / effects-examples

Examples to illustrate the use of algebraic effects in Multicore OCaml
ISC License
423 stars 35 forks source link

`Yield` effect unused in `aio` #33

Closed Sudha247 closed 11 months ago

Sudha247 commented 2 years ago

https://github.com/ocaml-multicore/effects-examples/blob/master/aio/aio.ml#L16 defines Yield here, but it's not used anywhere in the rest of the scheduler. Was it supposed to be used somewhere or could we remove it?

(pointed out by @Leonidas-from-XIV)

dhil commented 2 years ago

I suppose it is unused in this example (the echo server), and as such it could probably go. In general it can be quite useful as a primitive to force preemption rather than having to perform an IO operation.

Sudha247 commented 11 months ago

Fixed by #38.