O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required