git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@8910 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
12867aa75a
commit
55378a9683
|
@ -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))
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue