hack_parallel

Parallel and shared memory library
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library hack_parallel.procs
Module Worker
exception Worker_exited_abnormally of int * Unix.process_status
exception Worker_oomed

Worker killed by Out Of Memory.

exception Worker_busy

Raise this exception when sending work to a worker that is already busy. * We should never be doing that, and this is an assertion error.

exception Worker_killed

Raise this exception when sending work to a worker that is already killed. * We should never be doing that, and this is an assertion error.

type send_job_failure =
| Worker_already_exited of Unix.process_status
| Other_send_job_failure of exn
exception Worker_failed_to_send_job of send_job_failure
type t
type 'a handle
type 'a entry
val register_entry_point : restore:( 'a -> unit ) -> 'a entry
val make : saved_state:'a -> entry:'a entry -> nbr_procs:int -> gc_control:Gc.control -> heap_handle:SharedMem.handle -> t list

Creates a pool of workers.

val call : t -> ( 'a -> 'b ) -> 'a -> 'b handle
val get_result : 'a handle -> 'a
type 'a selected = {
readys : 'a handle list;
waiters : 'a handle list;
}
val select : 'a handle list -> 'a selected
val get_worker : 'a handle -> t
val killall : unit -> unit
val current_worker_id : unit -> int