|
|
|
|
|
by scottlamb
480 days ago
|
|
> Could an unguarded TreeMap cause 3,200% utilization? I've seen the same thing with an undersynchronized java.util.HashMap. This would have been in like 2009, but afaik it can still happen today. iirc HashMap uses chaining to resolve collisions; my guess was it introduced a cycle in the chain somehow, but I just got to work nuking the bad code from orbit [1] rather than digging in to verify. I often interview folks on concurrency knowledge. If they think a data race is only slightly bad, I'm unimpressed, and this is an example of why. [1] This undersynchronization was far from the only problem with that codebase. |
|