Closed talex5 closed 9 months ago
This is great! It's something I need to port a major codebase to Eio and I can't be the only one. Good decision on [ `Would_block | `Closed]
.
Another useful and related feature is something similar to Lwt_stream.closed
('a t -> unit Lwt.t
), it returns a promise that resolves once the stream is closed.
Not sure about adding a closed promise. It's easy enough for users to do that themselves if they need it - it doesn't need any support from Eio.
This isn't currently exposed in the public interface, but that could be done easily enough.
Need to decide how to indicate end-of-stream. This version has
take
returnNone
, but that also means thattake_nonblocking
returnsNone
for both no-item and closed-stream./cc @SGrondin This might be useful for #639.