# Module OpamProcess.Job

    module Job: sig .. end

Higher-level interface to allow parallelism

    module Op: sig .. end

Open type and add combinators.

    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.

    val catch : (exn -> 'a Op.job) ->
           'a Op.job -> 'a Op.job

Catch exceptions raised within a job

    val ignore_errors : default:'a ->
           ?message:string -> 'a Op.job -> 'a Op.job

Ignore all non-fatal exceptions raised by job and return default

    val finally : (unit -> unit) -> 'a Op.job -> 'a Op.job

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`

    val of_list : ?keep_going:bool ->
           OpamProcess.command list ->
           (OpamProcess.command * OpamProcess.result) option Op.job

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.

    val with_text : string -> 'a Op.job -> 'a Op.job

Sets and overrides text of the underlying commands