Switching approaches to check for max throttle

This commit is contained in:
Viktor Klang 2012-02-13 18:14:35 +01:00
parent 7c57a9d60e
commit 607ec4c2cf
7 changed files with 30 additions and 50 deletions

View file

@ -32,12 +32,11 @@ class Dispatcher(
val shutdownTimeout: Duration)
extends MessageDispatcher(_prerequisites) {
protected[akka] val executorServiceFactory: ExecutorServiceFactory =
protected val executorServiceFactory: ExecutorServiceFactory =
executorServiceFactoryProvider.createExecutorServiceFactory(id, prerequisites.threadFactory)
protected[akka] val executorService = new AtomicReference[ExecutorService](new ExecutorServiceDelegate {
lazy val executor = executorServiceFactory.createExecutorService
})
protected val executorService = new AtomicReference[ExecutorServiceDelegate](
new ExecutorServiceDelegate { lazy val executor = executorServiceFactory.createExecutorService })
protected[akka] def dispatch(receiver: ActorCell, invocation: Envelope) = {
val mbox = receiver.mailbox