8 ms·
Lock contention IIRC
by nicktelford 3y ago
Lock contention IIRC
- the-alchemist 3y agoYeah, 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.
- kaba0 3y agoFor what it worth, there actually is a separate JEP (I believe this: https://openjdk.org/jeps/429 https://openjdk.org/jeps/429 ) for a new, scope-bases solution that promises much better performance.
- deleted 3y ago[deleted]
- layer8 3y agoBut the lock would only need to be per platform thread?