module ScheduledThreadPoolExecutor:sig
..end
type
t
val make : int32 -> RejectedExecutionHandler.t -> t
make cps reh
returns a new thread pool with:cps
as its core pool size (number of threads kept in the pool,
even if idle);reh
policy for blocked computations.Invalid_argument
if cps
is negative.val await_termination : t -> int64 -> TimeUnit.t -> bool
ThreadPoolExecutor.await_termination
.val get_active_count : t -> int32
ThreadPoolExecutor.get_active_count
.val get_completed_task_count : t -> int64
val get_continue_existing_periodic_tasks_after_shutdown_policy : t -> bool
val get_core_pool_size : t -> int32
val get_execute_existing_delayed_tasks_after_shutdown_policy : t -> bool
val get_keep_alive_time : t -> TimeUnit.t -> int64
val get_largest_pool_size : t -> int32
val get_maximum_pool_size : t -> int32
val get_pool_size : t -> int32
ThreadPoolExecutor.get_pool_size
.val get_rejected_execution_handler : t -> RejectedExecutionHandler.t
val get_remove_on_cancel_policy : t -> bool
val get_task_count : t -> int64
ThreadPoolExecutor.get_task_count
.val invoke_all : t -> (unit -> 'a) list -> 'a Future.t list
ThreadPoolExecutor.invoke_all
.val invoke_all_time : t ->
(unit -> 'a) list -> int64 -> TimeUnit.t -> 'a Future.t list
ThreadPoolExecutor.invoke_all_time
.val invoke_any : t -> (unit -> 'a) list -> 'a
ThreadPoolExecutor.invoke_any
.val invoke_any_time : t ->
(unit -> 'a) list -> int64 -> TimeUnit.t -> 'a
ThreadPoolExecutor.invoke_any_time
.val is_shutdown : t -> bool
ThreadPoolExecutor.is_shutdown
.val is_terminated : t -> bool
ThreadPoolExecutor.is_terminated
.val is_terminating : t -> bool
ThreadPoolExecutor.is_terminating
.val schedule : t ->
('a -> 'b) -> 'a -> int64 -> TimeUnit.t -> 'b ScheduledFuture.t
schedule p f x t u
is similar to submit p f x
, except that the
evaluation of f x
with start after t
(time value whose unit is
u
).
Raises Failure
if pool limits are reached.
val schedule_at_fixed_rate : t ->
('a -> unit) -> 'a -> int64 -> int64 -> TimeUnit.t -> unit ScheduledFuture.t
schedule_at_fixed_rate p f x t d u
is similar to schedule p f x t u
,
except that f x
will be re-evaluated at t + d
, t + 2 * d
, etc.
Raises Failure
if pool limits are reached.
Raises Invalid_argument
if d
is negative.
val schedule_with_fixed_delay : t ->
('a -> unit) -> 'a -> int64 -> int64 -> TimeUnit.t -> unit ScheduledFuture.t
schedule_with_fixed_delay p f x t d u
is similar to schedule p f x t u
,
except that f x
will be repeatedly re-evaluated, respecting a delay
of d
between the end of one execution and the beginning of the next
one.
Raises Failure
if pool limits are reached.
Raises Invalid_argument
if d
is negative.
val set_continue_existing_periodic_tasks_after_shutdown_policy : t -> bool -> unit
val set_core_pool_size : t -> int32 -> unit
val set_execute_existing_delayed_tasks_after_shutdown_policy : t -> bool -> unit
val set_keep_alive_time : t -> int64 -> TimeUnit.t -> unit
val set_maximum_pool_size : t -> int32 -> unit
val set_rejected_execution_handler : t -> RejectedExecutionHandler.t -> unit
val set_remove_on_cancel_policy : t -> bool -> unit
val shutdown : t -> unit
ThreadPoolExecutor.shutdown
.val shutdown_now : t -> 'a Future.t list
ThreadPoolExecutor.shutdown_now
.val submit : t -> ('a -> 'b) -> 'a -> 'b Future.t
ThreadPoolExecutor.submit
.