io.pyroscope.labels.ScopedContext Maven / Gradle / Ivy
package io.pyroscope.labels;
import one.profiler.AsyncProfiler;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
class ScopedContext implements AutoCloseable {
static final ThreadLocal context = ThreadLocal.withInitial(() ->
new Context(0L, Collections.emptyMap())
);
final Context previous;
final Context current;
final Ref