Up

Module Job_queue

Internal to Async -- a queue of jobs to run.

Signature

val sexp_of_t : t -> Sexplib.Sexp.t
include Core_kernel.Std.Invariant.S with type t := t
type t
val invariant : t Invariant_intf.inv
val create : unit -> t
val enqueue : t -> Execution_context.t -> ('a -> unit) -> 'a -> unit
val clear : t -> unit
val set_jobs_left_this_cycle : t -> int -> unit
val can_run_a_job : t -> bool
val length : t -> int
val run_jobs : t -> Scheduler.t -> (unit, exn * string) Core_kernel.Std.Result.t
val num_jobs_run : t -> int