Module Pipe_lib.Strict_pipe

exception Overflow of string
exception Multiple_reads_attempted of string
type crash =
| Overflow_behavior_crash
type drop_head =
| Overflow_behavior_drop_head
type call =
| Overflow_behavior_call
type (_, _, _) overflow_behavior =
| Crash : ( 'a, crash, unit ) overflow_behavior
| Drop_head : ( 'a -> unit ) -> ( 'a, drop_head, unit ) overflow_behavior
| Call : ( 'a -> 'r ) -> ( 'a, call, 'r option ) overflow_behavior
type synchronous =
| Type_synchronous
type _ buffered =
| Type_buffered
type (_, _, _) type_ =
| Synchronous : ( 'a, synchronous, unit Async_kernel.Deferred.t ) type_
| Buffered : [ `Capacity of int ] * [ `Overflow of ( 'a, 'b, 'r ) overflow_behavior ] -> ( 'a, 'b buffered, 'r ) type_

A ('a, 'behavior, 'write_result) type_ is a representation of strict pipe types. * 'a is the type of data written over the pipe, 'behavior is a type parameter for classifying * which overflow behavior the pipe exhibits, and 'write_result determines the return type of * writing to the pipe.

module Reader : sig ... end
module Writer : sig ... end
val create : ?name:string -> ?warn_on_drop:bool -> ( 't, 'type_, 'write_return ) type_ -> 't Reader.t * ( 't, 'type_, 'write_return ) Writer.t
val transfer : 'a Reader.t -> ( 'b, 'type_, 'writer_return ) Writer.t -> f:( 'a -> 'b ) -> unit Async_kernel.Deferred.t
val transfer_while_writer_alive : 'a Reader.t -> ( 'b, 'type_, 'writer_return ) Writer.t -> f:( 'a -> 'b ) -> unit Async_kernel.Deferred.t