mirror of
https://github.com/ocaml-multicore/eio.git
synced 2025-12-04 00:03:37 -05:00
`with_flow` wraps an Eio sink, flushing to it automatically when the writing fiber blocks. This is intended to be then normal way of using `Buf_write` from Eio. Some other changes to Faraday: - I replaced `yield` with `pause` and `unpause`, as it was unclear to me what it should do. - `flush` now waits for the flush to complete instead of taking a callback (since we now have effects). - `operation` is now `await_batch`. It now waits until data is available to write instead of returning `Yield`. - `shift_buffers` and `shift_flushes` are now tail-recursive. - Fixed overflow bug in `shift_flushes`. - Removed `write_` prefix from write functions, as it's now in the module name. - `string` and `bytes` now check the range is valid. - `serialize` no longer hangs if it gets receives `Closed.