diff --git a/akka-actor/src/main/resources/reference.conf b/akka-actor/src/main/resources/reference.conf index ecbf916a9a..f31e61bcbe 100644 --- a/akka-actor/src/main/resources/reference.conf +++ b/akka-actor/src/main/resources/reference.conf @@ -80,6 +80,7 @@ akka { # Dispatcher, (BalancingDispatcher, only valid when all actors using it are of the same type), # A FQCN to a class inheriting MessageDispatcherConfigurator with a no-arg visible constructor name = "DefaultDispatcher" # Name used in log messages and thread names. + daemonic = off # Toggles whether the threads created by this dispatcher should be daemons or not keep-alive-time = 60s # Keep alive time for threads core-pool-size-min = 8 # minimum number of threads to cap factor-based core number to core-pool-size-factor = 8.0 # No of core threads ... ceil(available processors * factor) diff --git a/akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala b/akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala index 0f6091d23b..35284879a4 100644 --- a/akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala +++ b/akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala @@ -287,7 +287,7 @@ abstract class MessageDispatcherConfigurator() { //Apply the following options to the config if they are present in the config - ThreadPoolConfigDispatcherBuilder(createDispatcher, ThreadPoolConfig()) + ThreadPoolConfigDispatcherBuilder(createDispatcher, ThreadPoolConfig(daemonic = config getBoolean "daemonic")) .setKeepAliveTime(Duration(config getMilliseconds "keep-alive-time", TimeUnit.MILLISECONDS)) .setAllowCoreThreadTimeout(config getBoolean "allow-core-timeout") .setCorePoolSizeFromFactor(config getInt "core-pool-size-min", config getDouble "core-pool-size-factor", config getInt "core-pool-size-max") diff --git a/akka-docs/scala/code/DispatcherDocSpec.scala b/akka-docs/scala/code/DispatcherDocSpec.scala index f132a5e90f..057ce05602 100644 --- a/akka-docs/scala/code/DispatcherDocSpec.scala +++ b/akka-docs/scala/code/DispatcherDocSpec.scala @@ -17,6 +17,7 @@ object DispatcherDocSpec { //#my-dispatcher-config my-dispatcher { type = Dispatcher # Dispatcher is the name of the event-based dispatcher + daemonic = off # Toggles whether the threads created by this dispatcher should be daemons or not core-pool-size-min = 2 # minimum number of threads to cap factor-based core number to core-pool-size-factor = 2.0 # No of core threads ... ceil(available processors * factor) core-pool-size-max = 10 # maximum number of threads to cap factor-based number to