package async_extended

  1. Overview
  2. Docs

A throttle that coalesces jobs, only fully executing the most recent job.

type 'a t

A coalesced throttle.

val create : unit -> 'a t

Create a coalesced throttle.

val enqueue : 'a t -> (maybe_abort:(continue:(unit -> 'a Async.Deferred.t) -> 'a Async.Deferred.t) -> 'a Async.Deferred.t) -> 'a Async.Deferred.t

Enqueue a job, which may be coalesced into a later job.

OCaml

Innovation. Community. Security.