This PR adds a couple of useful features to conditions:
Eio.Condition.loop_no_mutex t fn calls fn initially and whenever the condition fires, taking care not to miss events that occur while fn is running. This should be less error prone than the trick with two fibers, and improves the performance of #562 somewhat.
Eio.Condition.register_immediate registers a function to be called immediately on broadcast, from the caller's context. This is intended for bridging to other IO libraries that have their own wake up mechanisms. I need it to forward SIGCHLD to Lwt in a way that continues working even after the Eio event loop finishes.
This PR adds a couple of useful features to conditions:
Eio.Condition.loop_no_mutex t fn
callsfn
initially and whenever the condition fires, taking care not to miss events that occur whilefn
is running. This should be less error prone than the trick with two fibers, and improves the performance of #562 somewhat.Eio.Condition.register_immediate
registers a function to be called immediately on broadcast, from the caller's context. This is intended for bridging to other IO libraries that have their own wake up mechanisms. I need it to forward SIGCHLD to Lwt in a way that continues working even after the Eio event loop finishes.