7
Ecco il mio codice:Messaggio di errore con Scala AKKA Attore
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))
}
sto ottenendo un errore con questa linea:
test = Await.result(myActor ? "test", Duration(1, TimeUnit.SECONDS))
L'errore è:
non riusciva a trovare valore implicito per il timeout del parametro: akka.util.Timeout
Cosa succede se voglio utilizzare semplicemente il default. http://doc.akka.io/api/akka/2.0/akka/actor/ActorRef.html menziona (nei commenti) che c'è un 'akka.actor.timeout'. Come farlo kick? – akauppi