package devkit

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

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20210120.tbz
md5=47338eaae436aba40abd4d194ee40054
sha256=499b050b73643f6ad7349a41485539d4166d149a07fba59cb6841f508c0297f8
sha512=6a5bf77061d390ddb331ed3d5891a5c56502be91f0eff6846202f658ebfa97ef57695d7a192cbdad4c7b8835f5665df3ea4375daf46930334ebbd9a07f00feca

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.