Skip to content

Instantly share code, notes, and snippets.

@tyru
Created April 6, 2009 11:47
Show Gist options
  • Select an option

  • Save tyru/90726 to your computer and use it in GitHub Desktop.

Select an option

Save tyru/90726 to your computer and use it in GitHub Desktop.
// Threadとどう違うのよ
class Human(no:Int) extends scala.actors.Actor {
def act() = println(no + "人目 誕生")
}
object Main {
def main(args:Array[String]) = {
// 子孫繁栄
(1 to 6).foreach(no => {
println(no + "人目 着床")
new Human(no) start
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment