Module Ecaml__.Background

val don't_wait_for : Core_kernel.Source_code_position.t -> (unit -> unit Async.Deferred.t) -> unit

don't_wait_for here f is like Async.don't_wait_for, except that it marks all jobs created by running f as background jobs.

module Clock : sig ... end
val assert_foreground : ?⁠message:Async.Sexp.t -> Core_kernel.Source_code_position.t -> unit

If this is called in a background Async job, raise an exception.

val currently_running_in_background : unit -> Core_kernel.Source_code_position.t option

Return Some location when the current Async job is a background job. location is the Source_code_position.t describing where the job was originally tagged as running in the background.

val am_running_in_background : unit -> bool
val am_running_in_foreground : unit -> bool
val run_in_background : Core_kernel.Source_code_position.t -> f:(unit -> 'a) -> 'a