在ScalaActors.pdf上的这个幻灯片放映中,单个引号指示何时将消息发送给pong actor?
class Ping(count: int, pong: Pong) extends Actor {
def act() {
pong ! 'Ping // what does the single quote indicate???
receive {
case 'Pong =>
}
}
}
Run Code Online (Sandbox Code Playgroud)