From dfca401ab009b5d7496f12ec433deca5ea82e1d0 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 14 Mar 2011 08:27:47 +0100 Subject: [PATCH] Revert "Switching ThreadBasedDispatcher to use SynchronousQueue since only one actor should be in it" This reverts commit f980dc3f23dbe930e348d84618e29e154927177d. --- .../main/scala/akka/dispatch/ThreadBasedDispatcher.scala | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/akka-actor/src/main/scala/akka/dispatch/ThreadBasedDispatcher.scala b/akka-actor/src/main/scala/akka/dispatch/ThreadBasedDispatcher.scala index 1435884aee..a8dfcf5860 100644 --- a/akka-actor/src/main/scala/akka/dispatch/ThreadBasedDispatcher.scala +++ b/akka-actor/src/main/scala/akka/dispatch/ThreadBasedDispatcher.scala @@ -9,7 +9,7 @@ import akka.config.Config.config import akka.util.Duration import java.util.Queue -import java.util.concurrent.{TimeUnit, SynchronousQueue} +import java.util.concurrent.{ConcurrentLinkedQueue, BlockingQueue, TimeUnit, LinkedBlockingQueue} import akka.actor import java.util.concurrent.atomic.AtomicReference @@ -47,11 +47,6 @@ class ThreadBasedDispatcher(_actor: ActorRef, _mailboxType: MailboxType) } object ThreadBasedDispatcher { - val oneThread: ThreadPoolConfig = - ThreadPoolConfig( - allowCorePoolTimeout = true, - corePoolSize = 1, - maxPoolSize = 1, - queueFactory = () => new SynchronousQueue[Runnable]) + val oneThread: ThreadPoolConfig = ThreadPoolConfig(allowCorePoolTimeout = true, corePoolSize = 1, maxPoolSize = 1) }