May 2017
Intermediate to advanced
414 pages
13h
English
The following are the steps to use a future with an actor and to retrieve a result of the computation:
import akka.actor.{Actor, ActorSystem, Props} import akka.pattern.ask import akka.util.Timeout import scala.concurrent.Await import scala.concurrent.duration._
class ComputationActor extends Actor { def receive = { case (a: Int, b: Int) => sender ! (a + b) } }
object FutureWithScala extends App { implicit ...Read now
Unlock full access