torkell: (Default)
[personal profile] torkell
The Java HashMap class is not synchronised (and that is explicitly documented). This results in... interesting behaviour if two or more threads try to modify a HashMap at the same time.

Apparently, one of the failure modes is for the put() method to get stuck in an infinite loop.

Date: 2011-07-22 02:06 am (UTC)
From: [identity profile] olego.livejournal.com
It's easier in C++: since nothing is synchronised, you shouldn't be surprised when you get strange multi-threaded behaviour. That's why we use tons of locks.

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 8th, 2026 09:07 am
Powered by Dreamwidth Studios