observe-lwt supplies a configurable Lwt implementation of Observe.IO.S. It provides callback-local dynamic bindings, cleanup, and native Lwt.Canceled handling, then Observe_lwt.create completes it with a caller-provided clock, console, and dynamic-context safety check. The latter keeps observe-lwt portable: a single-threaded runtime can always allow lookup, while a threaded composition should allow it only in the scheduler execution context.
Use Observe_lwt.IO with Observe.Make when an application needs a custom Lwt composition. Most Lwt applications on Unix can use the ready observe-lwt-unix package instead. A custom composition supplies sampling_draw and create_stable_sampling_draw to Observe_lwt.create. A draw returns a finite value in the half-open interval from zero to one, promptly. The stable factory performs no draw itself and returns a concurrency-safe one-shot callback that invokes the source at most once.