
Talk
Is ThreadLocal Outdated? Detailed Comparison With ScopedValue
In Russian
With the appearance of virtual threads, ThreadLocal is no longer the only solution for context transfer — Java 21 introduced ScopedValue. But when to use what? Which is faster and uses less memory?