Making it green
This commit is contained in:
parent
e5b3fd00a2
commit
aa4ad6f3c3
20 changed files with 155 additions and 104 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue