7
Aquí está mi código:mensaje de error con Scala AKKA Actor
class testActor extends Actor {
var test = "test2"
def receive = {
case "test" ⇒
"works"
}
}
def test = Action {
var test = "test"
val system = ActorSystem("MySystem")
val myActor = system.actorOf(Props[testActor.testActor], name = "testActor")
test = Await.result(myActor ? "test", Duration(1, TimeUnit.SECONDS))
}
estoy recibiendo un error con esta línea:
test = Await.result(myActor ? "test", Duration(1, TimeUnit.SECONDS))
El error es:
no podían encontrar valor implícito para el tiempo de espera del parámetro: akka.util.Timeout
¿Qué pasa si quiero usar simplemente el defecto. http://doc.akka.io/api/akka/2.0/akka/actor/ActorRef.html menciona (en los comentarios) que hay un 'akka.actor.timeout'. ¿Cómo hacer que funcione? – akauppi