module ThreadPoolExecutor:sig..end
type t
val make : int32 ->
int32 ->
int64 -> TimeUnit.t -> RejectedExecutionHandler.t -> tmake cps mps kat u reh returns a new thread pool with:cps as its core pool size (number of threads kept in the pool,
even if idle);mps as its maximum pool size (maximum number of threads in the
pool);kat keep alive time (how long to keep alive idle threads not in
the core);u time unit for kat;reh policy for blocked computations.Invalid_argument if a size is negative.val await_termination : t -> int64 -> TimeUnit.t -> boolt (time value
whose unit is u).
Raises Runtime.Interrupted if the thread is interrupted.
val get_active_count : t -> int32val get_completed_task_count : t -> int64val get_core_pool_size : t -> int32val get_keep_alive_time : t -> TimeUnit.t -> int64val get_largest_pool_size : t -> int32val get_maximum_pool_size : t -> int32val get_pool_size : t -> int32val get_rejected_execution_handler : t -> RejectedExecutionHandler.tval get_task_count : t -> int64val invoke_all : t -> (unit -> 'a) list -> 'a Future.t listinvoke_all p l submits all functions from l to pool p, and then
waits for the completion of all functions. Returns the list of
created futures; it is guaranteed that all futures have completed.
Raises Runtime.Interrupted if the thread is interrupted.
val invoke_all_time : t ->
(unit -> 'a) list -> int64 -> TimeUnit.t -> 'a Future.t listinvoke_all_time p l t u is similar to invoke_all p l, except that
the current thread will at most wait for t (time value whose unit
is u).
Raises Runtime.Interrupted if the thread is interrupted.
val invoke_any : t -> (unit -> 'a) list -> 'ainvoke_any p l submits all function from l to pool p, and then
waits for the completion of a function. Returns the value computed by
the first function completing its execution.
Raises Runtime.Interrupted if the thread is interrupted.
Raises Failure if no function completes without raising an
exception.
val invoke_any_time : t -> (unit -> 'a) list -> int64 -> TimeUnit.t -> 'ainvoke_any_time p l t u is similar to invoke_any p l, except that
the current thread will at most wait for t (time value whose unit
is u).
Raises Runtime.Interrupted if the thread is interrupted.
Raises Failure if no function completes without raising an
exception.
Raises Runtime.TimeoutException f time has elapsed without any
function completing its execution.
val is_shutdown : t -> boolval is_terminated : t -> boolval is_terminating : t -> boolval set_core_pool_size : t -> int32 -> unit
Raises Invalid_argument if parameter is negative.
val set_keep_alive_time : t -> int64 -> TimeUnit.t -> unit
Raises Invalid_argument if parameter is negative.
val set_maximum_pool_size : t -> int32 -> unit
Raises Invalid_argument if parameter is negative.
val set_rejected_execution_handler : t -> RejectedExecutionHandler.t -> unitval shutdown : t -> unitval shutdown_now : t -> 'a Future.t listval submit : t -> ('a -> 'b) -> 'a -> 'b Future.tsubmit p f x submits to p and returns a future computing f x.
Raises Failure if pool limits are reached.