O'Reilly logo

Java Closures and Lambda by Robert Fischer

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

CHAPTER 6

image

Lambda Concurrency

The Java programming language is, at its core, a series of instructions. These instructions are executed in sequence. By default, you only ever have one of these series going at a time. However, if you have multiple processing cores on your machine, or if you have any kind of I/O, then this single series of instructions suddenly becomes very inefficient. If your program has a lot to do, but its single stream has to wait for the “read” I/O instruction to complete before doing anything else, then your program is wasting time. If you have four processing cores, but only one stream of instructions, then you are at best ...

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