equal
deleted
inserted
replaced
72 |
72 |
73 /** |
73 /** |
74 * Drops all thread locals (and inherited thread locals). |
74 * Drops all thread locals (and inherited thread locals). |
75 */ |
75 */ |
76 public final void eraseThreadLocals() { |
76 public final void eraseThreadLocals() { |
77 UNSAFE.putObject(this, THREAD_LOCALS, null); |
77 UNSAFE.putReference(this, THREAD_LOCALS, null); |
78 UNSAFE.putObject(this, INHERITABLE_THREAD_LOCALS, null); |
78 UNSAFE.putReference(this, INHERITABLE_THREAD_LOCALS, null); |
79 } |
79 } |
80 |
80 |
81 static { |
81 static { |
82 UNSAFE = jdk.internal.misc.Unsafe.getUnsafe(); |
82 UNSAFE = jdk.internal.misc.Unsafe.getUnsafe(); |
83 Class<?> t = Thread.class; |
83 Class<?> t = Thread.class; |