Class Lazy.Concurrent<T>

java.lang.Object
net.minecraftforge.common.util.Lazy.Concurrent<T>
All Implemented Interfaces:
Supplier<T>, Lazy<T>
Enclosing interface:
Lazy<T>

public static final class Lazy.Concurrent<T> extends Object implements Lazy<T>
Thread-safe implementation.
  • Field Details

    • lock

      private volatile Object lock
    • supplier

      private volatile Supplier<T> supplier
    • instance

      private volatile T instance
  • Constructor Details

    • Concurrent

      private Concurrent(Supplier<T> supplier)
  • Method Details

    • get

      @Nullable public final T get()
      Specified by:
      get in interface Supplier<T>