Class ConcurrentThreadLocal<T>

java.lang.Object
io.perfmark.impl.ConcurrentThreadLocal<T>

public class ConcurrentThreadLocal<T> extends Object
A "thread local" variable that uses weak refs to track the thread to value mapping. This class is useful when ThreadLocal instances are inconvenient.

Like All classes in this package, this class is not API stable.

  • Field Details

  • Constructor Details

    • ConcurrentThreadLocal

      public ConcurrentThreadLocal()
  • Method Details

    • get

      public T get()
    • remove

      public void remove()
    • set

      public void set(T value)
    • initialValue

      protected T initialValue()
    • initialValueInternal

      private T initialValueInternal()
    • drainQueue

      private void drainQueue()
    • drainQueue

      private void drainQueue(Reference<? extends Thread> ref)