Hi *,

Let's say I have an actor which receives a message Start and is processing
this message asynchrounously.

someActor ! start

class SomeActor {
  def receive = {
    case Start =>
      for {
       _ <- someFuture
      } yield ()
  }

Because processing of Start happens asynchronous it could be that SomeActor
receives more messages before the processing of start is completed.

What would be my options to improve this behaviour?
- I could use Await.result - which does not seem to be a reasonable option
- I could use the ask pattern and pipe the response back to the sender. In
that case what would happen if other actors send me messages?

Are there any other ways to deal with this situation? I am concerned that
messages arrive when the actor is not in a stable state yet, and I would
like to prevent this.

Thanks,
Markus

-- 
>>>>>>>>>>      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