Module Ecaml.Background
A background job is an Async job that the emacs UI is not blocking on. These jobs are special -- they can only interact with the UI in limited ways to avoid interfering with blocking jobs, or with the user. For example, background jobs may not change the current buffer.
val don't_wait_for : Core_kernel.Source_code_position.t -> (unit -> unit Async.Deferred.t) -> unitdon't_wait_for here fis likeAsync.don't_wait_for, except that it marks all jobs created by runningfas background jobs.
module Clock : sig ... endval assert_foreground : ?message:Async.Sexp.t -> Core_kernel.Source_code_position.t -> unitIf this is called in a background Async job, raise an exception.
val currently_running_in_background : unit -> Core_kernel.Source_code_position.t optionReturn
Some locationwhen the current Async job is a background job.locationis theSource_code_position.tdescribing where the job was originally tagged as running in the background.
val am_running_in_background : unit -> boolval am_running_in_foreground : unit -> boolval run_in_background : Core_kernel.Source_code_position.t -> f:(unit -> 'a) -> 'a