package hack_parallel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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 =
  1. | Worker_already_exited of Unix.process_status
  2. | 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 = {
  1. readys : 'a handle list;
  2. 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
OCaml

Innovation. Community. Security.