Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
output_channel.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
open! Core open! Async include Output_channel0 module Input_channel = Input_channel0 let of_pipe info pipe_writer = Async.Unix.pipe info >>| fun (`Reader rd, `Writer wr) -> let input_channel = Input_channel.create rd in let output_channel = create wr in let flushed = let%bind () = Input_channel.transfer input_channel pipe_writer in let%map () = Input_channel.close input_channel and () = close output_channel in Pipe.close pipe_writer in output_channel, flushed ;;