Hacker News new | ask | show | jobs
by drtse4 86 days ago
A huge mistake, I've seen a lot of code where clearly the author thought that just adding "synchronized" would have solved any concurrency issue. And no one even talks about how synchronized is implemented, basically a monitor on the object.

The point of view is usually also wrong, they focus on the method call flow while they should think about protecting access to shared data.

1 comments

Yeah. The more I learn about concurrency (which I think is a fair amount at this point), the more I respect Erlang. It was so ahead of its time with this stuff.

As I said, I feel like when I reach for a lock, about 95% of the time it’s because I don’t really understand the problem well enough.