Hacker News new | ask | show | jobs
by hythloday 5217 days ago
Just FYI, ConcurrentHashMap is indeed lockfree (although it's got a gargantuan memory footprint). Wrapping your HashMap with Collections.synchronizedMap gives you a blocking threadsafe HashMap.
1 comments

ConcurrentHashMap is not lock free, it uses lock striping across multiple buckets.
I stand corrected.