Up

Module Signal

Signature

type 'a t
val create : ?eq:('a -> 'a -> bool) -> 'a -> 'a t
val close : 'a t -> unit
val get : 'a t -> 'a
val set : 'a t -> 'a -> unit
val send : 'a t -> 'a -> unit
val upon : 'a t -> f:('a -> unit) -> unit
val next : 'a t -> 'a Async.Std.Deferred.t

next t returns the next value in t

val on_update : 'a t -> ?stop_condition:('a -> bool) -> ('a -> unit) -> unit
val register : 'a t -> f:('a -> Synccast.interest_status Async.Std.Deferred.t) -> unit
val register_init : 'a t -> init:(unit -> unit Async.Std.Deferred.t) -> f:('a -> Synccast.interest_status Async.Std.Deferred.t) -> unit
val register_self_init : 'a t -> f:('a -> Synccast.interest_status Async.Std.Deferred.t) -> unit

register_self_init t ~f same as register init, but uses the function f as the initialization function

val create_repeater : ?randomize:float -> ?stop_condition:(Core.Std.Time.t -> bool) -> Core.Std.Time.Span.t -> Core.Std.Time.t t