package hack_parallel

  1. Overview
  2. Docs
Parallel and shared memory library

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.1.tar.gz
md5=ba7c72bc207e326b72e294fc76f6ad2c
sha512=5020d47f97bea2f88e2a40411894d03232a7f2282606926c93c7d4c96d72e94a966be852897a9b16f7e0893ba376512045abb9d93020a7c03c3def4f3d918f8e

doc/hack_parallel.procs/Worker/index.html

Module WorkerSource

* Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the "hack" directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. *

Sourceexception Worker_exited_abnormally of int * Unix.process_status
Sourceexception Worker_oomed

Worker killed by Out Of Memory.

Sourceexception 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.

Sourceexception 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.

Sourcetype send_job_failure =
  1. | Worker_already_exited of Unix.process_status
  2. | Other_send_job_failure of exn
Sourceexception Worker_failed_to_send_job of send_job_failure
Sourcetype t
Sourcetype 'a handle
Sourcetype 'a entry
Sourceval register_entry_point : restore:('a -> unit) -> 'a entry
Sourceval 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.

Sourceval call : t -> ('a -> 'b) -> 'a -> 'b handle
Sourceval get_result : 'a handle -> 'a
Sourcetype 'a selected = {
  1. readys : 'a handle list;
  2. waiters : 'a handle list;
}
Sourceval select : 'a handle list -> 'a selected
Sourceval get_worker : 'a handle -> t
Sourceval killall : unit -> unit
Sourceval current_worker_id : unit -> int
OCaml

Innovation. Community. Security.