package dune-rpc

  1. Overview
  2. Docs

Module Make.StreamSource

Control for a polling loop

Sourcetype 'a t
Sourceval cancel : _ t -> unit Fiber.t

cancel t notify the server that we are stopping our polling loop. It is an error to call next after cancel

Sourceval next : 'a t -> 'a option Fiber.t

next t poll for the next value. It is an error to call next again until the previous next terminated. If next returns None, subsequent calls to next is forbidden.

OCaml

Innovation. Community. Security.