package devkit

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

devkit-1.3.tbz
sha256=dae965685dceed47ad8e9844f12fe707dafdf2c3bdd46d0431d5b4d1e7754b23
sha512=b94ade804d751db87434042bbaa821fa8e82e233820a76806f910e2da040094b137e88a3579911a1626930912622b064c776ddbcb6991fb7111021ebf6553fdc

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

Module Parallel.ForksSource

Forked workers

Parameters

module T : WorkerT

Signature

Sourcetype task = T.task
Sourcetype result = T.result
Sourcetype t
Sourceval create : (task -> result) -> int -> t

create f n starts n parallel workers waiting for tasks

Sourceval perform : t -> ?autoexit:bool -> task Enum.t -> (result -> unit) -> unit

perform workers tasks f distributes tasks to all workers in parallel, collecting results with f and returns when all tasks are finished

Sourceval stop : ?wait:int -> t -> unit

stop ?wait workers kills worker processes with SIGTERM is wait is specified it will wait for at most wait seconds before killing with SIGKILL, otherwise it will wait indefinitely

  • parameter autoexit

    determines whether workers will exit once there are no more tasks, it means perform shouldn't be called again for this instance

OCaml

Innovation. Community. Security.