package tezos-baking-alpha

  1. Overview
  2. Docs
val sleep_until : Tezos_base.Time.Protocol.t -> unit Lwt.t option

main ~name ~cctxt ~stream ~state_maker ~pre_loop ~timeout_maker ~timeout_k ~event_k is an infinitely running loop that monitors new events arriving on stream. The loop exits when the stream gives an error.

The function pre_loop is called before the loop starts.

The loop maintains a state (of type 'state) initialized by state_maker and passed to the callbacks timeout_maker (used to set up waking-up timeouts), timeout_k (when a computed timeout happens), and event_k (when a new event arrives on the stream).