Skip to content

Commit

Permalink
locking per actor and not per running map
Browse files Browse the repository at this point in the history
  • Loading branch information
ga2arch committed Apr 25, 2016
1 parent a756bea commit 52db365
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class AbstractDispatcher {
public void dispatch(final ActorRef actorRef) {
try {
final AbstractActor actor = getSystem().getActor(actorRef);
synchronized (running) {
synchronized (actor) {
if (running.contains(actorRef)) return;
running.add(actorRef);

Expand All @@ -44,7 +44,7 @@ public void run() {
Log.e(LOG_TAG, e.getMessage(), e);

} finally {
synchronized (running) {
synchronized (actor) {
if (!actor.isTerminated() && actor.getMailbox().size() > 0) {
running.remove(actorRef);
dispatch(actorRef);
Expand Down

0 comments on commit 52db365

Please sign in to comment.