Merge branch 'master' of github.com:jboner/akka

This commit is contained in:
Jonas Bonér 2011-08-30 18:43:06 +02:00
commit c8d738f534
2 changed files with 3 additions and 6 deletions

View file

@ -35,10 +35,7 @@ private[actor] final class ActorRegistry private[actor] () extends ListenerManag
/**
* Finds the actor that has a specific address.
*/
def actorFor(address: String): Option[ActorRef] = {
if (actorsByAddress.containsKey(address)) Some(actorsByAddress.get(address))
else None
}
def actorFor(address: String): Option[ActorRef] = Option(actorsByAddress.get(address))
/**
* Finds the typed actors that have a specific address.

View file

@ -66,12 +66,12 @@ class BalancingDispatcher(
actorRef, aType))
}
synchronized { members :+= actorRef } //Update members
members :+= actorRef //Update members, doesn't need synchronized, is guarded in attach
super.register(actorRef)
}
protected[akka] override def unregister(actorRef: LocalActorRef) = {
synchronized { members = members.filterNot(actorRef eq) } //Update members
members = members.filterNot(actorRef eq) //Update members, doesn't need synchronized, is guarded in detach
super.unregister(actorRef)
}