News for hackers. Stuff that matters.
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C... by nicktelford on Wednesday April 12, 2023 @08:44AM (#35538742)
Lock contention IIRC
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C... by the-alchemist on Wednesday April 12, 2023 @09:03AM (#35538980)
Yeah, poor performance and memory usage. In the Java world, thread locals are java.lang.ThreadLocal, basically a hashmap from thread to variable.

Using a ThreadLocal is (usually) a code smell. It's optimized / supposed to be used with just a few threads, not millions.

Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C... by kaba0 on Wednesday April 12, 2023 @09:54AM (#35539692)
For what it worth, there actually is a separate JEP (I believe this: https://openjdk.org/jeps/429 ) for a new, scope-bases solution that promises much better performance.
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C... by layer8 on Wednesday April 12, 2023 @09:21AM (#35539200)
But the lock would only need to be per platform thread?