package incr_select
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=52848ff15a1636c24b3ad79be99a4324c48341a928bc38cd3bbbd4a1a65c1134
md5=d00eb011ede05fdbf39d23243078531b
doc/incr_select/Incr_select/Make/argument-1-Incr/Update/index.html
Module Incr.Update
on_update t ~f is similar to Observer.on_update_exn, but it does not cause t to be necessary. Instead of the Initialized update, there are updates for when a node becomes Necessary or Unnecessary. Here is a state diagram for the allowable sequences of Update.t's that can be supplied to a particular f:
/-----------------------------------------------------\ | / | | | v Start ------> Necessary ----------> Changed ------> Invalidated | | ^ | ^ | ^ | | | /---------/ \--/ | | v | v | \----------> Unnecessary -----------------------------/
If t gets a new value during a stabilization but is unnecessary at the end of it, f will _not_ be called with Changed, but with Unnecessary if allowed by the transition diagram. I.e. if the prior call to f was with Necessary or Changed, f will be called with Unnecessary. If the prior call to f was with Invalidated or Unnecessary, then f will not be called.
One should typically use Observer.on_update_exn, unless the Unnecessary updates are needed.
val sexp_of_t :
('a -> Ppx_sexp_conv_lib.Sexp.t) ->
'a t ->
Ppx_sexp_conv_lib.Sexp.t