package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20210517.tbz
md5=00995ebead339d6ec1ba7859c3fc3a58
sha256=5ad39c7fa1a966a2f0a7f6dbb7e82c787439c73482f5f44b3c9fb54b040d36eb
sha512=8dd3f7d4aaabae9aa9ede13edee2b22214c0d2e2780bb08b2ca8ed588d74fc6d9b1908bb31dfee49c949c7cc425fb98897b8e0f11280070ebd99b965908ea133

doc/devkit.core/Devkit_core/Parallel/index.html

Module Devkit_core.ParallelSource

Parallel

Sourceval invoke : ('a -> 'b) -> 'a -> unit -> 'b

Invoke function in a forked process and return result

Sourceval launch_forks : ('a -> unit) -> 'a list -> unit

Launch function for each element of the list in the forked process. Does not wait for children to finish - returns immediately.

Sourceval run_forks : ?wait_stop:int -> ?revive:bool -> ?wait:int -> ?workers:int -> ('a -> unit) -> 'a list -> unit

Launch forks for each element of the list and wait for all workers to finish. Pass exit signals to the workers, see Forks.stop for the description of wait_stop parameter.

  • parameter revive

    to keep workers running (restarting with same param if exited) default: false

Sourceval run_forks' : ('a -> unit) -> 'a list -> unit

Same as run_forks but do not fork for one worker

Sourceval run_workers : int -> ?wait_stop:int -> ('a -> unit) -> 'a list -> unit

Process list with specified number of workers. Pass exit signals to the workers, see Forks.stop for the description of wait_stop parameter.

Sourceval run_workers_enum : int -> ?wait_stop:int -> ('a -> 'b) -> ('b -> unit) -> 'a Enum.t -> unit

Process enum with specified number of workers, collect results via provided callback. Pass exit signals to the workers, see Forks.stop for the description of wait_stop parameter.

Sourcemodule type WorkerT = sig ... end
Sourcemodule type Workers = sig ... end
Sourcemodule Forks (T : WorkerT) : Workers with type task = T.task and type result = T.result

Forked workers

Sourcemodule Services : sig ... end
OCaml

Innovation. Community. Security.