package devkit

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

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20240429.tbz
sha256=222f8ac131b1d970dab7eeb2714bfd6b9338b88b1082e6e01c136ae19e7eaef4
sha512=c9e6d93e3d21e5530c0f4d5baca51bf1f0a5d19248f8af7678d0665bb5cdf295d7aaaaa3e50eb2e44b8720e55097cc675af4dc8ec45acf9da39feb3eae1405d5

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.