sig
type 'a state = Done of 'a | Waiting | Failed of exn
module type PARAM = sig val min_size : int val max_size : int end
exception Stopped
module Make :
functor (P : PARAM) ->
sig
val run : (unit -> 'a) -> unit
val run1 : ('a -> 'b) -> 'a -> unit
val run2 : ('a -> 'b -> 'c) -> 'a -> 'b -> unit
val run3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> unit
val set_exn_handler : (exn -> unit) -> unit
val active : unit -> bool
val stop : unit -> unit
module Fut :
sig
type 'a t
type 'a future = 'a CCPool.Make.Fut.t
val return : 'a -> 'a CCPool.Make.Fut.t
val fail : exn -> 'a CCPool.Make.Fut.t
val make : (unit -> 'a) -> 'a CCPool.Make.Fut.t
val make1 : ('a -> 'b) -> 'a -> 'b CCPool.Make.Fut.t
val make2 : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c CCPool.Make.Fut.t
val get : 'a CCPool.Make.Fut.t -> 'a
val state : 'a CCPool.Make.Fut.t -> 'a CCPool.state
val is_done : 'a CCPool.Make.Fut.t -> bool
val on_success : 'a CCPool.Make.Fut.t -> ('a -> unit) -> unit
val on_failure : 'a CCPool.Make.Fut.t -> (exn -> unit) -> unit
val on_finish :
'a CCPool.Make.Fut.t -> ('a CCPool.state -> unit) -> unit
val flat_map :
('a -> 'b CCPool.Make.Fut.t) ->
'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
val and_then :
'a CCPool.Make.Fut.t ->
(unit -> 'b CCPool.Make.Fut.t) -> 'b CCPool.Make.Fut.t
val sequence_a :
'a CCPool.Make.Fut.t array -> 'a array CCPool.Make.Fut.t
val map_a :
('a -> 'b CCPool.Make.Fut.t) ->
'a array -> 'b array CCPool.Make.Fut.t
val sequence_l :
'a CCPool.Make.Fut.t list -> 'a list CCPool.Make.Fut.t
val map_l :
('a -> 'b CCPool.Make.Fut.t) ->
'a list -> 'b list CCPool.Make.Fut.t
val choose_a : 'a CCPool.Make.Fut.t array -> 'a CCPool.Make.Fut.t
val choose_l : 'a CCPool.Make.Fut.t list -> 'a CCPool.Make.Fut.t
val map :
('a -> 'b) -> 'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
val map_async :
('a -> 'b) -> 'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
val app :
('a -> 'b) CCPool.Make.Fut.t ->
'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
val app_async :
('a -> 'b) CCPool.Make.Fut.t ->
'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
val sleep : float -> unit CCPool.Make.Fut.t
module Infix :
sig
val ( >>= ) :
'a CCPool.Make.Fut.t ->
('a -> 'b CCPool.Make.Fut.t) -> 'b CCPool.Make.Fut.t
val ( >> ) :
'a CCPool.Make.Fut.t ->
(unit -> 'b CCPool.Make.Fut.t) -> 'b CCPool.Make.Fut.t
val ( >|= ) :
'a CCPool.Make.Fut.t -> ('a -> 'b) -> 'b CCPool.Make.Fut.t
val ( <*> ) :
('a -> 'b) CCPool.Make.Fut.t ->
'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
end
val ( >>= ) :
'a CCPool.Make.Fut.t ->
('a -> 'b CCPool.Make.Fut.t) -> 'b CCPool.Make.Fut.t
val ( >> ) :
'a CCPool.Make.Fut.t ->
(unit -> 'b CCPool.Make.Fut.t) -> 'b CCPool.Make.Fut.t
val ( >|= ) :
'a CCPool.Make.Fut.t -> ('a -> 'b) -> 'b CCPool.Make.Fut.t
val ( <*> ) :
('a -> 'b) CCPool.Make.Fut.t ->
'a CCPool.Make.Fut.t -> 'b CCPool.Make.Fut.t
end
end
end