hack_parallel

Parallel and shared memory library
Library hack_parallel.interface
type 'a in_channel

Type-safe versions of the channels in Pervasives.

type 'a out_channel
type ('in_, 'out) channel_pair = 'in_ in_channel * 'out out_channel
val to_channel : 'a out_channel -> ?flags:Marshal.extern_flags list -> ?flush:bool -> 'a -> unit
val from_channel : ?timeout:Timeout.t -> 'a in_channel -> 'a
val flush : 'a out_channel -> unit
val descr_of_in_channel : 'a in_channel -> Unix.file_descr
val descr_of_out_channel : 'a out_channel -> Unix.file_descr
val cast_in : 'a in_channel -> Timeout.in_channel
val cast_out : 'a out_channel -> Pervasives.out_channel
val close_out : 'a out_channel -> unit
val output_string : 'a out_channel -> string -> unit
val close_in : 'a in_channel -> unit
val input_char : 'a in_channel -> char
val input_value : 'a in_channel -> 'b

Spawning new process

type ('param, 'input, 'output) entry
val register_entry_point : string -> ( 'param -> ( 'input, 'output ) channel_pair -> unit ) -> ( 'param, 'input, 'output ) entry
type ('in_, 'out) handle = {
channels : ( 'in_, 'out ) channel_pair;
pid : int;
}
val devnull : unit -> ( 'a, 'b ) handle
val fd_of_path : string -> Unix.file_descr
val null_fd : unit -> Unix.file_descr
val fork : ?channel_mode:[ `pipe | `socket ] -> (Unix.file_descr * Unix.file_descr) -> ( 'param -> ( 'input, 'output ) channel_pair -> unit ) -> 'param -> ( 'output, 'input ) handle
val spawn : ?channel_mode:[ `pipe | `socket ] -> (Unix.file_descr * Unix.file_descr * Unix.file_descr) -> ( 'param, 'input, 'output ) entry -> 'param -> ( 'output, 'input ) handle
val close : ( 'a, 'b ) handle -> unit
val kill : ( 'a, 'b ) handle -> unit
val check_entry_point : unit -> unit