Module OpamProcess.JobSource
Higher-level interface to allow parallelism
Sequential run of a job
Same as run but doesn't actually run any shell command, and feed a dummy result to the cont.
val catch :
(exn -> 'a OpamProcess.Job.Op.job) ->
(unit -> 'a OpamProcess.Job.Op.job) ->
'a OpamProcess.Job.Op.jobCatch exceptions raised within a job
val ignore_errors :
default:'a ->
?message:string ->
(unit -> 'a OpamProcess.Job.Op.job) ->
'a OpamProcess.Job.Op.jobIgnore all non-fatal exceptions raised by job and return default
val finally :
(unit -> unit) ->
(unit -> 'a OpamProcess.Job.Op.job) ->
'a OpamProcess.Job.Op.jobRegister 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 OpamProcess.Job.Op.jobConverts 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 of_fun_list :
?keep_going:bool ->
(unit -> OpamProcess.command) list ->
(OpamProcess.command * OpamProcess.result) option OpamProcess.Job.Op.jobAs 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 given homogeneous jobs run sequentially
Sequentially maps jobs on a list
Sets and overrides text of the underlying commands