A thread-safe pipe is a thread-safe interface to the write end of a normal
Async.Pipe. All operations except for
create must be called from threads outside
create can be called from inside or outside Async.
Pipe functions that return a
unit Deferred.t, the analog in
For documentation of
wakeup_scheduler, see the Thread_safe module.
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.targument to specify how to deal with the possibility that the pipe is closed:
Raiseon closed pipe, or
Returna variant indicating whether the pipe is closed.
closed writer blocks the current thread until the pipe is closed.