Isolated Mutability
Before we can apply actors to our file exploring problem, we need to address one final issue—shared mutability. It’s common for programmers to create shared mutable variables and beat around with synchronization primitives to provide thread safety. Largely this has been a disaster. It’s hard to imagine getting concurrency right with the JDK library if the programmers haven’t mastered Brian Goetz’s Java Concurrency in Practice [Goe06]. But, once they master that book they soon realize that it’s hard to get concurrency right with the JDK library, period.
This is not a dismissal of the JDK for concurrency. After all, Akka and other libraries that support different concurrency models like the Software Transactional Memory—see ...
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