Optimizing for bestcase when sending an actor a message

This commit is contained in:
Viktor Klang 2011-02-27 23:44:04 +01:00
parent dea85ef81f
commit ba3a473330
2 changed files with 13 additions and 11 deletions

View file

@ -64,9 +64,7 @@ trait MessageDispatcher {
unregister(actorRef)
}
private[akka] final def dispatchMessage(invocation: MessageInvocation): Unit = if (active.isOn) {
dispatch(invocation)
} else throw new IllegalActorStateException("Can't submit invocations to dispatcher since it's not started")
private[akka] final def dispatchMessage(invocation: MessageInvocation): Unit = dispatch(invocation)
private[akka] def register(actorRef: ActorRef) {
if (actorRef.mailbox eq null)