Module Async.Std.Pipe

module Pipe: sig .. end
A Pipe is a first-in first-out communication channel. A pipe has a "writer" end and a "reader" end. The writer feeds values into the pipe and the reader can subsequently read them back out.

module Reader: sig .. end
module Writer: sig .. end
val create : unit -> 'a Reader.t * 'a Writer.t
Creates a new pipe, and returns the reader and writer ends.
val write : 'a Writer.t -> 'a -> unit Deferred.t
Writes data into the writer end of a pipe.
val read : 'a Reader.t -> [ `Eof | `Ok of 'a ] Deferred.t
Reads data from the reader end of the pipe. Returns `Eof if the pipe has been closed (we have not documented the close function here).