org.codehaus.gpars

org.codehaus.gpars

GPars (Groovy Parallel Systems) offers Groovy developers intuitive ways to handle tasks concurrently.

See:
          Description

Packages
groovyx.gpars
groovyx.gpars.activeobject
groovyx.gpars.actor
groovyx.gpars.actor.impl
groovyx.gpars.agent
groovyx.gpars.csp
groovyx.gpars.csp.plugAndPlay
groovyx.gpars.csp.util
groovyx.gpars.dataflow
groovyx.gpars.dataflow.impl
groovyx.gpars.dataflow.operator
groovyx.gpars.dataflow.stream
groovyx.gpars.forkjoin
groovyx.gpars.group
groovyx.gpars.memoize
groovyx.gpars.pa
groovyx.gpars.remote
groovyx.gpars.remote.message
groovyx.gpars.remote.netty
groovyx.gpars.scheduler
groovyx.gpars.serial
groovyx.gpars.stm
groovyx.gpars.util

 

GPars (Groovy Parallel Systems) offers Groovy developers intuitive ways to handle tasks concurrently.

The framework provides straightforward Groovy-based Domain Specific Languages (DSLs) to declare, which parts of the code should be performed in parallel. Objects are enhanced with asynchronous methods like eachParallel(), collectParallel() and others, to perform collection-based operations in parallel. Also, closures can be turned into their asynchronous variants, which when invoked schedule the original closure for processing in an executor service. The library also provides several helper methods for running a set of closures concurrently.

Effective Scala-like actors are ready to make your code leverage an inherently safer way to organize concurrent code by eliminating mutable shared state altogether. With actors support you can quickly create several independent Actors, which consume messages passed to them in their own thread and communicate with other actors by sending them messages. You then build your solution by combining these actors into a communication network.

The library has four logical parts.

  1. Actors provide a Groovy implementation of Scala-like actors, remote actors, Clojure-like agents and a couple of specialized actors like DynamicDispatchActor or Reactor.
  2. Dataflow Concurrency (since version 0.8) allows for very natural shared-memory concurrency model, based on single-assignment variables.
  3. And CSP implementation is likely to appear soon as well.
  4. ThreadPool uses the Java 1.5 built-in support for executor services to enable multi-threaded collection and closure processing.
  5. ForkJoinPool uses JSR-166y Parallel Arrays to enable multi-threaded collection processing.


Copyright © 2008–2010 Václav Pech. All Rights Reserved.