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
val invariant : t Core.Std.Invariant.inv
val create : max_num_threads:int -> Thread_pool.t Core.Std.Or_error.t
val finished_with : Thread_pool.t -> unit
val max_num_threads : Thread_pool.t -> int
val num_threads : Thread_pool.t -> int
val default_priority : Thread_pool.t -> Thread_pool.Priority.t
val add_work :
?priority:Thread_pool.Priority.t ->
?name:string ->
Thread_pool.t -> (unit -> unit) -> unit Core.Std.Or_error.t
module Helper_thread :
sig
type t
val default_name : Thread_pool.Helper_thread.t -> string
val default_priority :
Thread_pool.Helper_thread.t -> Thread_pool.Priority.t
end
val create_helper_thread :
?priority:Thread_pool.Priority.t ->
?name:string ->
Thread_pool.t -> Thread_pool.Helper_thread.t Core.Std.Or_error.t
val add_work_for_helper_thread :
?priority:Thread_pool.Priority.t ->
?name:string ->
Thread_pool.t ->
Thread_pool.Helper_thread.t -> (unit -> unit) -> unit Core.Std.Or_error.t
val finished_with_helper_thread :
Thread_pool.t -> Thread_pool.Helper_thread.t -> unit
val sexp_of_t : Thread_pool.t -> Sexplib.Sexp.t
end