perf[virtual]: virtual thread task can not set Attachment to ThreadLocal

This commit is contained in:
godotg
2024-02-21 17:15:58 +08:00
parent 742a90e7a4
commit 4a35397432
2 changed files with 9 additions and 16 deletions
@@ -28,11 +28,12 @@ public class FastThreadLocalAdapter<T> {
}
public T get() {
// return Thread.currentThread().isVirtual() ? supplier.get() : fastThreadLocal.get();
// return Thread.currentThread().isVirtual() ? supplier.get() : fastThreadLocal.get();
return fastThreadLocal.get();
}
public void set(T value) {
// if (Thread.currentThread().isVirtual()) return;
fastThreadLocal.set(value);
}