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

This commit is contained in:
godotg committed 2024-02-21 17:15:58 +08:00
1 parent 742a90e7a4
commit 4a35397432
2 files changed
+9 -16

No files matched your search

@@ -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);
}