ocaml-core / base / async / core / lib / scheduler.mli

open Core.Std
open Basic

val invariant : unit -> unit
val current_execution_context  : unit -> Execution_context.t
val set_block_group            : Block_group.t -> unit
val set_main_execution_context : Execution_context.t -> unit
val with_execution_context     : Execution_context.t -> f:(unit -> 'a) -> 'a
val add_job                    : Execution_context.t -> ('a -> unit) -> 'a -> unit
val main_execution_context     : unit -> Execution_context.t
val cycle_start : unit -> Time.t
val start_cycle : now:Time.t -> unit
val finish_cycle : now:Time.t -> [ `Jobs_remain | `No_jobs_remain ]
val next_upcoming_event : unit -> Time.t option
val uncaught_exception : unit -> exn option
val num_pending_jobs : unit -> int
val num_jobs_run : unit -> int
val cycle_times : unit -> Time.Span.t Stream.t
val cycle_num_jobs : unit -> int Stream.t
val cycle_count : unit -> int
val set_max_num_jobs_per_priority_per_cycle : int -> unit

val within_context : Execution_context.t -> (unit -> 'a) -> ('a, unit) Result.t

type 'a with_options =
     ?block_group:Block_group.t
  -> ?monitor:Monitor.t
  -> ?priority:Priority.t
  -> 'a
val within'   : ((unit -> 'a Deferred.t) -> 'a Deferred.t) with_options
val within    : ((unit -> unit         ) -> unit         ) with_options
val within_v  : ((unit -> 'a           ) -> 'a option    ) with_options
val schedule' : ((unit -> 'a Deferred.t) -> 'a Deferred.t) with_options
val schedule  : ((unit -> unit         ) -> unit         ) with_options
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.