Created
April 6, 2009 11:47
-
-
Save tyru/90726 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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