Created
June 17, 2011 11:22
-
-
Save mike-neck/1031240 to your computer and use it in GitHub Desktop.
GPars Actor 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.actor.Actors.*; | |
def console = actor{ | |
loop{ | |
react {msg -> | |
println msg | |
} | |
} | |
} | |
console.send('Hello, Actor') | |
console << 'Hello, World' | |
println 'Hello, println' | |
console.call('Hello, call') | |
console 'Hello Erlang' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment