Chapter 19Concurrency in Scala

by Venkat Subramaniam

We’ve seen the object-oriented paradigm and the functional style of programming interplay in Scala in the previous Scala chapters. In this chapter, we’ll use the functional purity for greater good—programming concurrency.

We all desire to make our applications faster and more responsive. There’s no shortage of resources with multiple cores in our hands. The hard part is writing the code correctly to reap the benefits of the power on hand.

To fully exploit the power of concurrency and perform various complex tasks, concurrency libraries like Akka[19] are quite helpful. (See also Programming Concurrency on the JVM [Sub11] by one of our favorite authors -ed.) However, in this chapter, we’ll ...

Get Functional Programming: A PragPub Anthology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.