Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (24 sloc) 0.479 kb
pong = nil
done = false
Parent = Thread current
ping = Actor spawn: {
loop: {
count = Actor receive
"." print
{ count println; done = true; break } if: (count > 1000)
pong ! (count + 1)
}
Parent run
}
pong = Actor spawn: {
loop: {
count = Actor receive
"-" print
{ count println; done = true; break } if: (count > 1000)
ping ! (count + 1)
}
Parent run
}
ping ! 1
# Let the actors process while the main thread sleeps...
Thread stop
Jump to Line
Something went wrong with that request. Please try again.