summaryrefslogtreecommitdiff
path: root/test/files/jvm/actor-termination.scala
blob: 19dfaf8e17f1d3495d1d162075dec85542a1a835 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import scala.actors.Actor

/* Test that an actor that hasn't finished prevents termination */

object Test {
  def main(args: Array[String]) {
    Actor.actor {
      println("I'm going to make you wait.")
      Thread.sleep(5000)
      println("Ok, I'm done.")
    }
  }
}