Module IStdlib.SafeLazy

type 'a t

A wrapper around a lazy value that can be forced in a thread-safe manner. NB values made with make cannot be marshalled, but values made with from_val can.

val make : 'a IStdlib.IStd.Lazy.t -> 'a t
val from_val : 'a -> 'a t
val from_val_option : 'a option -> 'a t option
val force : 'a t -> 'a
val force_option : 'a t option -> 'a option
val freeze : 'a t -> 'a t

Convert an existing value into one that can be marshalled, forcing the underlying lazy expression in the process.