sig
module Priority :
sig
type t = Core.Std.Linux_ext.Priority.t
val equal : t -> t -> bool
val of_int : int -> t
val to_int : t -> int
val incr : t -> t
val decr : t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
type t = Thread_pool.t
val invariant : t Core.Std.Invariant.inv
val create : max_num_threads:int -> t Core.Std.Or_error.t
val finished_with : t -> unit Core.Std.Or_error.t
val max_num_threads : t -> int
val num_threads : t -> int
val default_priority : t -> Priority.t
module Work_group :
sig
type t = Thread_pool.Work_group.t
val sexp_of_t : t -> Sexplib.Sexp.t
end
val create_work_group :
?min_assignable_threads:int ->
?max_assigned_threads:int -> t -> Work_group.t Core.Std.Or_error.t
val add_work_for_group :
?priority:Priority.t ->
?name:string ->
t -> Work_group.t -> (unit -> unit) -> unit Core.Std.Or_error.t
val finished_with_work_group :
t -> Work_group.t -> unit Core.Std.Or_error.t
module Helper_thread :
sig
type t = Thread_pool.Helper_thread.t
val default_name : t -> string
val default_priority : t -> Priority.t
end
val create_helper_thread :
?priority:Priority.t ->
?name:string -> t -> Work_group.t -> Helper_thread.t Core.Std.Or_error.t
val add_work_for_helper_thread :
?priority:Priority.t ->
?name:string ->
t -> Helper_thread.t -> (unit -> unit) -> unit Core.Std.Or_error.t
val finished_with_helper_thread :
t -> Helper_thread.t -> unit Core.Std.Or_error.t
val sexp_of_t : t -> Sexplib.Sexp.t
end