Making it green

This commit is contained in:
Viktor Klang 2012-07-22 21:40:09 +02:00
parent e5b3fd00a2
commit aa4ad6f3c3
20 changed files with 155 additions and 104 deletions

View file

@ -363,7 +363,7 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
val actorA, actorB, actorC, actorD = system.actorOf(Props.empty)
//#ask-pipeTo
import akka.pattern.{ ask, pipe }
import system.dispatcher // The ExecutionContext that will be used
case class Result(x: Int, s: String, d: Double)
case object Request

View file

@ -103,6 +103,7 @@ class Worker extends Actor with ActorLogging {
counterService ! Increment(1)
// Send current progress to the initial sender
import context.dispatcher // Use this Actors' Dispatcher as ExecutionContext
counterService ? GetCurrentCount map {
case CurrentCount(_, count) Progress(100.0 * count / totalCount)
} pipeTo progressListener.get