"Yesterday is not ours to recover, but today is to try and tomorrow is to win or lose."
- Anonymous
The idea that modern computers with multicore architectures give better performance is based on the fact that multiple processors can run separate processes simultaneously. Each process can run more than one thread to complete specific tasks. Picturing this, we can write programs with multiple threads working simultaneously to ensure better performance and responsiveness. We call this concurrent programming. In this chapter, our goal is to understand Scala's offerings in concurrent programming. There are multiple ways we can use constructs to write concurrent programs. We'll learn about them in this chapter. Let's check out what will be here for us:
- Concurrent programming
- Building blocks of concurrency:
- Process and threads...