Skip to content

Instantly share code, notes, and snippets.

@TonyLo1
Created September 22, 2016 16:46
Show Gist options
  • Save TonyLo1/cfcccaa6429c4929c7574594c11f9be5 to your computer and use it in GitHub Desktop.
Save TonyLo1/cfcccaa6429c4929c7574594c11f9be5 to your computer and use it in GitHub Desktop.
actor Main
new create(env: Env) =>
let pingPong : PingPong = PingPong
pingPong.ping(env)
actor PingPong
let that : PingPong = this
var i : I64 = 0
be ping(env: Env) =>
//Debug.out("Ping!")
that.pong(env)
be pong(env: Env) =>
if i < 1_000_000 then
//Debug.out("Pong!")
i = i + 1
that.ping(env)
else
env.out.print("Sent:" + i.string())
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment