On Thu, May 15, 2014 at 1:43 AM, Leon Ma <[email protected]> wrote:

> By "processes the messages one by one", do you mean My message B has to be
> wait until message A gets processed?
>
> They can't be executed in parallel?
>

It's worth emphasizing -- the fact that they can't be executed in parallel
is the entire *point* of the Actor model.  That means that problems like
the one you mention in your original post simply can't happen.  Code is
much easier to reason about, and avoids many of the common bugs of
multi-threading.

Actors think about parallelism very differently from ordinary threaded
code.  Instead of thinking about raw threads (and having to worry about
them stepping on each other), you define a large number of Actors.  Those
Actors can be operating in parallel with each other, but any *given* Actor
is effectively single-threaded.  So you can be confident that an Actor is
never processing multiple messages at any given time, while the system as a
whole scales extremely well.

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