module IO : sig ... end with type 'a t = 'a Deferred.t
IO monad
val flush : unit ‑> unit IO.t
Flush whatever need to be to get pending output out on file descriptor 0.
val run : (unit ‑> unit IO.t) ‑> unit
Run an IO operation until completion
val flushed : unit ‑> bool
Synchronous check that there is no pending output on file description 0. With async, there is no guarantee that on the rhs of a IO.bind (flush ()) ... the output is completely flushed, that's why we need this.
IO.bind (flush ()) ...