diff options
author | Philipp Haller <hallerp@gmail.com> | 2006-10-04 15:25:44 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2006-10-04 15:25:44 +0000 |
commit | 7d72618b375a21387e18fc42b07a834cee3f2616 (patch) | |
tree | 3086decebe82420407b3be89c9d1e1cae9123e88 /docs/examples/actors/RemoteCounter.scala | |
parent | 76faa29bb78029a79a327cbe5b6708b1c7b408de (diff) | |
download | scala-7d72618b375a21387e18fc42b07a834cee3f2616.tar.gz scala-7d72618b375a21387e18fc42b07a834cee3f2616.tar.bz2 scala-7d72618b375a21387e18fc42b07a834cee3f2616.zip |
Added ping pong example.
Diffstat (limited to 'docs/examples/actors/RemoteCounter.scala')
-rw-r--r-- | docs/examples/actors/RemoteCounter.scala | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/docs/examples/actors/RemoteCounter.scala b/docs/examples/actors/RemoteCounter.scala index b52259b6c2..2c6904f6ca 100644 --- a/docs/examples/actors/RemoteCounter.scala +++ b/docs/examples/actors/RemoteCounter.scala @@ -2,7 +2,7 @@ package examples.actors import scala.actors.Actor._ import scala.actors.RemoteActor._ -import scala.actors.{Actor,TcpNode} +import scala.actors.{Actor,Node} case object Incr case object Value @@ -25,15 +25,9 @@ object RemoteCounter extends Application { } actor { - val c = select(TcpNode("127.0.0.1", 9010), 'counter) - + val c = select(Node("127.0.0.1", 9010), 'counter) c ! Incr c ! Incr - - try { Thread.sleep(1000) } catch { - case ie: InterruptedException => - } - c ! Value receive { case Result(v) => { |