say, I have an Actor whose receive function likes
def receive = {
case Message =>
val doFuture: Future[String] = doSomething()
doFuture onSuccess {
case doResult =>
//////////// Here is the problem !! /////////////
// --> here fail. Seems sender cannot send back the result to the caller
sender ! doResult
}
doFuture onFailure {
// handle exception
}
}
why the sender cannot send back message any more ?
import context.dispatcher
– sarveshseri