[Home] Type Microsoft.FSharp.Control.Lazy


The type of delayed computations. Use the values in the Lazy module to manipulate values of this type, and the notation 'lazy expr' to create values of this type.

Full Type Signature

[<SealedAttribute ()>]
type Lazy<'a>
with
  static member Create : (unit -> 'a) -> Lazy<'a>
  static member CreateFromValue : 'a -> Lazy<'a>
  member Force : unit -> 'a
  member SynchronizedForce : unit -> 'a
  member UnsynchronizedForce : unit -> 'a
  member IsDelayed : bool
  member IsException : bool
  member IsForced : bool
  member Value : 'a
end

Instance Members

MemberDescription
member Force : unit -> 'a
Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to prevent other threads also computing the value. If the value is re-forced during its own computation the Undefined exception is raised.
member IsDelayed : bool
Indicates if the lazy value has yet to be computed
member IsException : bool
Indicates if the lazy value is being computed or the computation raised an exception
member IsForced : bool
Indicates if the lazy value has been successfully computed
member SynchronizedForce : unit -> 'a
Same as Force
member UnsynchronizedForce : unit -> 'a
Same as Force, except no lock is taken.
member Value : 'a
Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to prevent other threads also computing the value.

Static Members

MemberDescription
member Create : (unit -> 'a) -> Lazy<'a>
Create a lazy computation that evaluates to the result of the given function when forced
member CreateFromValue : 'a -> Lazy<'a>
Create a lazy computation that evaluates to the given value when forced

See Also

Microsoft.FSharp.Control


Documentation for assembly FSharp.Core, version 1.9.6.0, generated using F# Programming Language version 1.9.6.0