ocaml-multicore / eio

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

Eio_mock.Backend.yield_until_stable #645

Closed SGrondin closed 9 months ago

SGrondin commented 9 months ago

This is a complement to the new auto-advancing mock clocks of #644

I didn't replace the double-yield in network.md because #644 takes care of it.

This PR is intended to eliminate the need to manually yield more than once in tests, in the absence of clocks.

SGrondin commented 9 months ago

As pointed out by @talex5, any use of yield_until_stable can be replaced by a sleep 0 as of #644