Observe_lwt_unix.LifecycleExpert registration for independently installed Lwt-Unix outputs. Reports distinguish rejected, lost, failed, timed-out, and cancelled delivery; problem output labels are bounded runtime identities. Duration bounds are finite caller waits only; shared work continues after timeout.
module Duration : sig ... endAn aggregate of hook settlement and bounded runtime-identity problems. complete report means every participant settled without a reported problem at its owned effect boundary; it does not assert durability. Runtime control exceptions remain native rather than becoming reports.
val complete : report -> boolParticipant problems, identified by bounded runtime output labels.
exception Incomplete of reportmodule Integration : sig ... endval flush : ?within:Duration.t -> unit -> report Lwt.tRun an independent flush boundary and leave the lifecycle open. The finite within bounds this caller's waiter only; cancellation preserves Lwt.Canceled, while shared work continues.
val shutdown : ?within:Duration.t -> unit -> report Lwt.tStart or join the one shared idempotent shutdown; within bounds this caller's waiter only, shared work continues, and shutdown closes admission permanently.
val register :
flush:(unit -> unit Lwt.t) ->
shutdown:(unit -> unit Lwt.t) ->
(unit, error) Stdlib.resultJoin the process lifecycle while it is open. Registered hooks are owned until process shutdown. Every hook is attempted even when another hook fails. Independent flush boundaries may overlap each other and an in-progress shutdown, so callbacks must be prompt and concurrency-safe; repeated shutdown callers share one shutdown invocation. Runtime control exceptions remain native.