Last updated by venca 2 years ago
Installation
Type this command in your Grail application directory
grails install-plugin gparallelizer
or if you have a plugin archive locally.
$> grails install-plugin /path/to/grails-gparallelizer-0.2.zip
Dependencies
The
gparallelizer plugin has no other dependencies. If it cannot run out-of-the box, please report in the Grails user group.
Last updated by venca 2 years ago
This is a GParallelizer plugin for Grails. This plugin allows you to use GParallelizer (
http://code.google.com/p/gparallelizer/) in your Grails applications without need to manually download GParalelizer jar files. It also enables GParallelizer configuration through the standard Grails
Config.groovy file.
The latest plugin version is 0.1
Getting Started
This plugin installs the GParallelizer jar files in your app's lib folder and allows you to specify thread pool size in the
Config.groovy file.
GParallelizer is a Groovy concurrency library, which enables a couple of convenient DSLs and high-level concurrency constructs like actors, data-flow concurrency, concurrent collection processing and more. Check out all the options at (
http://code.google.com/p/gparallelizer/).
import static org.gparallelizer.actors.pooledActors.PooledActors.*
final def decryptor = actor {
loop {
react {String message->
reply message.reverse()
}
}
}.start()
def console = actor {
decryptor.send 'suonorhcnysa si yvoorG'
react {
println 'Decrypted message: ' + it
}
}.start()
console.join()
Configuration
The
Config.groovy file in
/grails-app/conf/ folder of your application can be used to configure behavior of the gparallelizer plugin.
environments {
production {
gparallelizer.poolsize='5'
}
development {
gparallelizer.poolsize='2'
}
test {
gparallelizer.poolsize='3'
}
}If you omit pool size configuration, the value specified for the
gparallelizer.poolsize system property will be used instead. If the system property has not been set, a reasonable default based on the number of detected CPU cores will be used.
Version History
v 0.3
- Updated to GParallelizer 0.8.4
v. 0.2
- Updated to GParallelizer 0.8.1
v. 0.1
Last updated by admin 2 years ago
Last updated by admin 2 years ago