/Pong
Created
September 22, 2016 16:46
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
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