package opam-core

  1. Overview
  2. Docs

Module OpamParallelSource

Parallel execution of jobs following a directed graph

Sourcemodule type VERTEX = sig ... end
Sourcemodule type G = sig ... end
Sourceexception Aborted

When one job fails due to an exception, other running jobs are interrupted and reported with this sub-exception in the Errors list

Simply parallel execution of tasks

Sourceexception Errors of int list * (int * exn) list * int list

In the simple iter, map and reduce cases, ints are the indexes of the jobs in the list

Sourceval iter : jobs:int -> command:('a -> unit OpamProcess.job) -> ?dry_run:bool -> 'a list -> unit
Sourceval map : jobs:int -> command:('a -> 'b OpamProcess.job) -> ?dry_run:bool -> 'a list -> 'b list
Sourceval reduce : jobs:int -> command:('a -> 'b OpamProcess.job) -> merge:('b -> 'b -> 'b) -> nil:'b -> ?dry_run:bool -> 'a list -> 'b

More complex parallelism with dependency graphs

Sourcemodule type SIG = sig ... end
Sourcemodule Make (G : G) : SIG with module G = G and type G.V.t = G.V.t
Sourcemodule type GRAPH = sig ... end
Sourcemodule MakeGraph (V : VERTEX) : GRAPH with type V.t = V.t
OCaml

Innovation. Community. Security.