git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@8910 5e8d7ff9-d8ef-0310-90f0-a4852d11357a

This commit is contained in:
phaller 2006-10-10 14:18:42 +00:00
parent 12867aa75a
commit 55378a9683
3 changed files with 6 additions and 24 deletions

View File

@ -1,19 +0,0 @@
package examples.actors
import scala.actors.Actor._
import scala.actors.Channel
object Input extends Application {
var in = new Channel[Pair[int, int]]
actor(in) {
in.receive {
case Pair(x, y) => reply(x + y)
}
}
actor {
scala.Console.println(in !? Pair(40, 2))
}
}

View File

@ -1,6 +1,6 @@
package examples.actors
import scala.actors.Reactor
import scala.actors.Actor
import scala.actors.Actor._
abstract class PingMessage
@ -25,7 +25,7 @@ object PingPong {
}
class Ping extends Reactor {
class Ping extends Actor {
def act(): unit = {
loop(0, null)
}
@ -60,7 +60,7 @@ class Ping extends Reactor {
}
}
class Pong extends Reactor {
class Pong extends Actor {
def act(): unit = {
loop(0)
}

View File

@ -1,8 +1,9 @@
package examples.actors
import scala.actors.Actor._
import scala.actors.RemoteActor._
import scala.actors.{Actor,Node}
import scala.actors.Actor
import scala.actors.remote.Node
import scala.actors.remote.RemoteActor._
case object Incr
case object Value