forked from scala/scala
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vojin Jovanovic
committed
Oct 26, 2012
1 parent
2c55424
commit 626bd15
Showing
4 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registered |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* NOTE: Code snippets from this test are included in the Actor Migration Guide. In case you change | ||
* code in these tests prior to the 2.10.0 release please send the notification to @vjovanov. | ||
*/ | ||
import scala.actors.Actor._ | ||
import scala.actors._ | ||
import scala.actors.migration._ | ||
import scala.actors.remote._ | ||
import scala.actors.remote.RemoteActor._ | ||
|
||
import java.util.concurrent.{ TimeUnit, CountDownLatch } | ||
import scala.collection.mutable.ArrayBuffer | ||
import scala.concurrent.duration._ | ||
import scala.concurrent.{ Promise, Await } | ||
|
||
object Test { | ||
val finished = Promise[Boolean] | ||
|
||
def main(args: Array[String]): Unit = { | ||
// Can fail with class cast exception in alive | ||
val myAkkaActor = ActorDSL.actor(new StashingActor { | ||
override def preStart() = { | ||
alive(2013) | ||
println("registered") | ||
finished success true | ||
context.stop(self) | ||
} | ||
|
||
def receive = { | ||
case x: Int => | ||
} | ||
}) | ||
|
||
} | ||
|
||
} |