Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens

This commit is contained in:
Viktor Klang 2011-12-14 17:26:18 +01:00
commit e959493e12
85 changed files with 983 additions and 1333 deletions

View file

@ -4,6 +4,8 @@ package akka.docs.actor
import akka.actor.Actor
import akka.actor.Props
import akka.event.Logging
import akka.dispatch.Future
//#imports1
//#imports2
@ -207,11 +209,9 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
val myActor = system.actorOf(Props(new MyActor))
implicit val timeout = system.settings.ActorTimeout
val future = myActor ? "hello"
future.as[String] match {
case Some(answer) //...
case None //...
}
val result: Option[Int] = for (x (myActor ? 3).as[Int]) yield { 2 * x }
for (x future) println(x) //Prints "hello"
val result: Future[Int] = for (x (myActor ? 3).mapTo[Int]) yield { 2 * x }
//#using-ask
system.stop(myActor)