Created
June 17, 2011 10:49
-
-
Save mike-neck/1031204 to your computer and use it in GitHub Desktop.
GPars Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static groovyx.gpars.GParsPool.*; | |
def numero = [1,2,3,4] | |
def square = [1,4,9,16] | |
withPool{ | |
assert square == numero.collectParallel { | |
println it | |
it * it | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment