Module Bus.Subscriber

module Subscriber: sig .. end
subscribe_exn t ~f causes f to be applied to all values subsequently written to t (or if t is unstarted, to prior values as well). subscribe_exn raises if it is called on a started bus with not can_subscribe_after_start. The function f is allowed to call other Bus functions on t, e.g. write, subscribe_exn, or unsubscribe.

If f raises, the corresponding subscriber will be automatically unsubscribed, and the exception will be sent to the monitor in effect when subscribe_exn was called.

Once unsubscribe t subscriber is called, f will never be called again.


type 'a t 
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t