Java Reference
In-Depth Information
Conclusion
I hope that you can now see the power of lambdas and streams to make concurrent code relatively easy. The
code becomes very readable, and you separate out the execution details from the work to be done. This is
truly one of the most impressive parts of post-functional code.
Note that there is still a time and a place for the other approaches. A single thread is useful as a one-
time fire-and-forget hook, or long-running background daemon tasks. Executors are useful when you
have a variety of work to be done and need more control over the thread pooling. The fork/join framework
works extremely well for recursive problems. But for the very common case of tying together a stream of
operations, lambdas and the stream frameworks are a powerful and welcome addition to the Java SDK.
 
Search WWH ::




Custom Search