summaryrefslogtreecommitdiff
path: root/test/pending/jvm/terminateLinked.scala
blob: 2a3b7fb49e399e4e6f1098597d259abbae3f3038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import scala.actors.Actor
import Actor._

object Test {
  def main(args: Array[String]) {
    val a = actor {
      for (_ <- 1 to 10)
        receive {
          case b: Actor => link(b)
        }
      throw new Exception
    }

    for (_ <- 1 to 10)
      actor {
        a ! self
        react {
          case _ =>
        }
      }

    println("Done")
  }
}