groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Re: About actor syntax for Groovy 3
Date Sat, 07 Jan 2017 17:21:09 GMT
class ActorTest  {
    def counter = new Counter()
    counter.start()

    for (i in 0 .. 100000) {
        counter <- i    // send message to the counter actor
    }
} 

should be modified as:

class ActorTest  {
    public static void main(String[] args) {
        def counter = new Counter()
        counter.start()

        for (i in 0 .. 100000) {
          counter <- i    // send message to the counter actor
        }
    }
} 



--
View this message in context: http://groovy.329449.n5.nabble.com/About-actor-syntax-for-Groovy-3-tp5737574p5737575.html
Sent from the Groovy Dev mailing list archive at Nabble.com.

Mime
View raw message