Module ScheduledThreadPoolExecutor

module ScheduledThreadPoolExecutor: sig .. end
Thread pools for scheduled futures.

type t 
The type of thread pools to be used for scheduled futures.
val make : int32 -> RejectedExecutionHandler.t -> t
make cps reh returns a new thread pool with: Raises Invalid_argument if cps is negative.
val await_termination : t -> int64 -> TimeUnit.t -> bool
Same as ThreadPoolExecutor.await_termination.
val get_active_count : t -> int32
Same as ThreadPoolExecutor.get_active_count.
val get_completed_task_count : t -> int64
Same as ThreadPoolExecutor.get_completed_task_count.
val get_continue_existing_periodic_tasks_after_shutdown_policy : t -> bool
Tests whether periodic tasks should continue execution after shutdown.
val get_core_pool_size : t -> int32
Same as ThreadPoolExecutor.get_core_pool_size.
val get_execute_existing_delayed_tasks_after_shutdown_policy : t -> bool
Tests whether delayed tasks should continue execution after shutdown.
val get_keep_alive_time : t -> TimeUnit.t -> int64
Same as ThreadPoolExecutor.get_keep_alive_time.
val get_largest_pool_size : t -> int32
Same as ThreadPoolExecutor.get_largest_pool_size.
val get_maximum_pool_size : t -> int32
Same as ThreadPoolExecutor.get_maximum_pool_size.
val get_pool_size : t -> int32
Same as ThreadPoolExecutor.get_pool_size.
val get_rejected_execution_handler : t -> RejectedExecutionHandler.t
Same as ThreadPoolExecutor.get_rejected_execution_handler.
val get_remove_on_cancel_policy : t -> bool
Tests whether tasks should be removed when cancelled.
val get_task_count : t -> int64
Same as ThreadPoolExecutor.get_task_count.
val invoke_all : t -> (unit -> 'a) list -> 'a Future.t list
Same as ThreadPoolExecutor.invoke_all.
val invoke_all_time : t ->
(unit -> 'a) list -> int64 -> TimeUnit.t -> 'a Future.t list
Same as ThreadPoolExecutor.invoke_all_time.
val invoke_any : t -> (unit -> 'a) list -> 'a
Same as ThreadPoolExecutor.invoke_any.
val invoke_any_time : t ->
(unit -> 'a) list -> int64 -> TimeUnit.t -> 'a
Same as ThreadPoolExecutor.invoke_any_time.
val is_shutdown : t -> bool
Same as ThreadPoolExecutor.is_shutdown.
val is_terminated : t -> bool
Same as ThreadPoolExecutor.is_terminated.
val is_terminating : t -> bool
Same as 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
Changes whether periodic tasks should continue execution after shutdown.
val set_core_pool_size : t -> int32 -> unit
Same as ThreadPoolExecutor.set_core_pool_size.
val set_execute_existing_delayed_tasks_after_shutdown_policy : t -> bool -> unit
changes whether delayed tasks should continue execution after shutdown.
val set_keep_alive_time : t -> int64 -> TimeUnit.t -> unit
Same as ThreadPoolExecutor.set_keep_alive_time.
val set_maximum_pool_size : t -> int32 -> unit
Same as ThreadPoolExecutor.set_maximum_pool_size.
val set_rejected_execution_handler : t -> RejectedExecutionHandler.t -> unit
Same as ThreadPoolExecutor.set_rejected_execution_handler.
val set_remove_on_cancel_policy : t -> bool -> unit
Changes whether tasks should be removed when cancelled.
val shutdown : t -> unit
Same as ThreadPoolExecutor.shutdown.
val shutdown_now : t -> 'a Future.t list
Same as ThreadPoolExecutor.shutdown_now.
val submit : t -> ('a -> 'b) -> 'a -> 'b Future.t
Same as ThreadPoolExecutor.submit.