The Simplest Thing That Could Possibly Work
Threads and locks are little more than a formalization of what the underlying hardware actually does. That’s both their great strength and their great weakness.
Because they’re so simple, almost all languages support them in one form or another, and they impose very few constraints on what can be achieved through their use. But they also provide almost no help to the poor programmer, making programs very difficult to get right in the first place and even more difficult to maintain.
We’ll cover threads-and-locks programming in Java, but the principles apply to any language that supports threads. On day 1 we’ll cover the basics of multithreaded code in Java, the primary pitfalls you’ll encounter, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access