module ExecutorCompletionService:sig
..end
type
t
val make : ThreadPoolExecutor.t -> t
val poll : t -> 'a Future.t option
None
.val poll_time : t -> int64 -> TimeUnit.t -> 'a Future.t option
poll_time s t u
is similar to pool s
, 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 submit : t -> ('a -> 'b) -> 'a -> 'b Future.t
ThreadPoolExecutor.submit
.val take : t -> 'a Future.t
Raises Runtime.Interrupted
if the thread is interrupted.