dispatcher speed improvements

This commit is contained in:
Jonas Bonér 2010-03-14 18:01:49 +01:00
parent dda8e515ca
commit d569b29a8b
2 changed files with 10 additions and 8 deletions

View file

@ -62,13 +62,14 @@ class ExecutorBasedEventDrivenDispatcher(_name: String) extends MessageDispatche
def dispatch(invocation: MessageInvocation) = if (active) { def dispatch(invocation: MessageInvocation) = if (active) {
executor.execute(new Runnable() { executor.execute(new Runnable() {
def run = { def run = {
invocation.receiver.synchronized { // invocation.receiver.synchronized {
var messageInvocation = invocation.receiver._mailbox.poll var messageInvocation = invocation.receiver._mailbox.poll
while (messageInvocation != null) { if (messageInvocation != null) messageInvocation.invoke
messageInvocation.invoke // while (messageInvocation != null) {
messageInvocation = invocation.receiver._mailbox.poll // messageInvocation.invoke
} // messageInvocation = invocation.receiver._mailbox.poll
} // }
// }
} }
}) })
} else throw new IllegalStateException("Can't submit invocations to dispatcher since it's not started") } else throw new IllegalStateException("Can't submit invocations to dispatcher since it's not started")

View file

@ -127,9 +127,10 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
Credentials(Path.userHome / ".akka_publish_credentials", log) Credentials(Path.userHome / ".akka_publish_credentials", log)
override def managedStyle = ManagedStyle.Maven override def managedStyle = ManagedStyle.Maven
val publishTo = "Scalable Solutions Maven Repository" at "http://scalablesolutions.se/akka/repository/" val publishTo = "Scalable Solutions Maven Repository" at "~/tmp/akka"
// val publishTo = "Scalable Solutions Maven Repository" at "http://scalablesolutions.se/akka/repository/"
val sourceArtifact = Artifact(artifactID, "src", "jar", Some("sources"), Nil, None) val sourceArtifact = Artifact(artifactID, "src", "jar", Some("sources"), Nil, None)
val docsArtifact = Artifact(artifactID, "docs", "jar", Some("javadoc"), Nil, None) // val docsArtifact = Artifact(artifactID, "docs", "jar", Some("javadoc"), Nil, None)
override def packageDocsJar = defaultJarPath("-javadoc.jar") override def packageDocsJar = defaultJarPath("-javadoc.jar")
override def packageSrcJar= defaultJarPath("-sources.jar") override def packageSrcJar= defaultJarPath("-sources.jar")