create ()
returns a reader end, which must be used inside Async, and a writer end,
which must be used outside Async. create
can be called inside or outside Async.
All the following functions must be called outside Async. They behave as their counterpart in the Pipe module.
pushback writer
blocks the current thread until the pipe is empty or closed.
If_closed.t
argument to specify
how to deal with the possibility that the pipe is closed: Raise
on closed pipe, or
Return
a variant indicating whether the pipe is closed.
transfer_in_without_pushback'
and write_without_pushback
transfer the element(s)
into the pipe and return immediately.
transfer_in
and write
transfer the element(s) into the pipe and block the current
thread until the pipe is empty or closed (like pushback).
closed writer
blocks the current thread until the pipe is closed.