Chapter 18. Concurrent Groovy with GPars

 

This chapter covers

  • Making concurrency more approachable with Groovy
  • Using different types of task coordination
  • Putting these concepts to work with the GPars library

The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.

Edsger Dijkstra

How do we tell truths that might hurt? Published as part of Selected Writings on Computing: A Personal Perspective, Springer-Verlag, 1982.

We’ll start our exploration with general considerations about concurrency followed by moving from the simple to the more advanced usages of concurrency. We’ll visit waypoints that show various means of coordinating concurrent tasks, from predefined coordination to implicit and explicit control. We’ll move on to investigate how to safeguard objects in a concurrent environment and wrap up the topic with a final showcase. But let’s start by considering why we might want to enter this challenging landscape in the first place.

Public wisdom has it that we’ll no longer see the major speed-ups in processor cycle times that we are so used to. In the past, the safest way to improve software performance was to wait 18 months, get a new computer, and enjoy the doubled speed.

18.1. Concurrency for the rest of us

18.2. Concurrent collection processing

18.3. Becoming more efficient with map/filter/reduce

18.4. Dataflow for implicit task coordination

18.5. Actors for explicit task coordination

18.6. Agents for delegated task coordination

18.7. Concurrency in action

18.8. Summary

sitemap