OpamProcess.Job
Higher-level interface to allow parallelism
module Op : sig ... end
Open type and add combinators. Meant to be opened
val run : 'a Op.job -> 'a
Sequential run of a job
val dry_run : 'a Op.job -> 'a
Same as run
but doesn't actually run any shell command, and feed a dummy result to the cont.
Catch exceptions raised within a job
Ignore all non-fatal exceptions raised by job and return default
Register an exception-safe finaliser in a job. finally job fin
is equivalent to catch job (fun e -> fin (); raise e) @@+ fun r -> fin (); Done r
Converts a list of commands into a job that returns None on success, or the first failed command and its result. Unless keep_going
is true, stops on first error.
As of_list
, but takes a list of functions that return the commands. The functions will only be evaluated when the command needs to be run.
Returns the job made of the the given homogeneous jobs run sequentially