public LazyLock(Func<T> factory)Initializes a new LazyLock<T> with the given factory.
All Types / Ferrous.Concurrency
public sealed class LazyLock<T>
A thread-safe lazily initialized value inspired by Rust's std::sync::LazyLock<T>. Safe to store in static readonly fields without triggering FE0501.
Tpublic LazyLock(Func<T> factory)Initializes a new LazyLock<T> with the given factory.
public bool IsInitializedGets a value indicating whether the value has been initialized.
public T ValueGets the lazily initialized value.