dbuenzli / affect

Composable concurrency primitives with OCaml effects handlers (unreleased)
https://erratique.ch/software/affect
ISC License
44 stars 3 forks source link

Get rid of busy yielding #1

Closed dbuenzli closed 2 weeks ago

dbuenzli commented 2 years ago

Busy yielding occurs both in Fiber.{first,either} and during fiber termination while waiting for the spawns to finish. It is, of course, inefficient.

We need to introduce a form of waiter sets for fibers. This won't change the basic API but will likely entail changes in the primitive effects that are exposed.

dbuenzli commented 2 weeks ago

The new implementation in c9fc5df3695f4b62026fa45a7a62d9ebc541622d no longer does that.