sig
type t = Thread_pool.t
val invariant : t -> unit
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
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 :
?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 end
val create_helper_thread :
?name:string -> t -> Work_group.t -> Helper_thread.t Core.Std.Or_error.t
val add_work_for_helper_thread :
?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
val ounit_tests : unit -> OUnit.test
end