Note.Logr
Event and signal changes loggers.
Loggers are the output interface of the reactive system. They allow external entities to observe event occurrences and signal changes.
val const : 'a -> 'a obs
const v
never changes and always observes v
.
app f v
is the observation that result from applying the changes of f
to the ones of v
.
create ~now o
is a logger that observes changes to o
. If now
is true
(default) logs at least one observation before the call returns.
val force : t -> unit
force l
observes l
even if nothing changed.
val destroy : t -> unit
destroy l
destroys log l
this ensure that l
's does not observe any change again. The underlying observed events or signals also stop updating, unless they are observed by another logger.
val hold : t -> unit
hold l
holds logger l
to ensure it does not get garbage collected.
val may_hold : t option -> unit
may_hold l
holds logger Some l
to ensure it does not get garbage collected. Does nothing on None
.