diff options
Diffstat (limited to 'test/files/jvm/t3412-channel.scala')
-rw-r--r-- | test/files/jvm/t3412-channel.scala | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/test/files/jvm/t3412-channel.scala b/test/files/jvm/t3412-channel.scala deleted file mode 100644 index af319d2303..0000000000 --- a/test/files/jvm/t3412-channel.scala +++ /dev/null @@ -1,40 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._, scala.actors.Actor._, scala.actors.Futures._ - - def main(args: Array[String]) { - - actor { - val C: Channel[Int] = new Channel[Int](self) - - def respondAll(fts: List[Future[Int]], cnt: Int): Unit = - fts match { - case List() => C ! 0 - case ft :: rest => - if (cnt % 100 == 0) - println(ft()) - respondAll(rest, cnt + 1) - } - - actor { - val fts = for (_ <- 1 to 1000) - yield C !! (3, {case x: Int => x}) - - actor { - respondAll(fts.toList, 0) - } - } - - loop { - C.react { - case 0 => exit() - case i => reply(i * 2) - } - } - } - - } - -} |