Hello Akka users,

I have a newbie question about message processing when a async request is 
fired off....

class MyActor extends Actor{


def receive = LoggingReceive{
case _ =>
    val s = sender
    future{ something } onComplete {
       s ! Result()
    }
}

When a message is received, "something" is executed in another thread.

What I'm puzzled about is, even with the use of closures and other tricks 
to capture the context of the sender, won't the actor "move on" to the next 
message?

It's possible that "something" takes so long that lots of subsequent 
messages would be processed even before the callback is executed.

What am I missing?

Thanks

David

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to