summaryrefslogtreecommitdiff
path: root/src/library/scala/concurrent/impl
diff options
context:
space:
mode:
authorViktor Klang <viktor.klang@gmail.com>2012-07-13 18:16:31 +0200
committerViktor Klang <viktor.klang@gmail.com>2012-07-13 18:16:31 +0200
commit7e0b9e8effaebbb6413e4cc63789b8f86428a684 (patch)
treebc0b7aef6fd1722ef3f8d8ad31a776bb701a375c /src/library/scala/concurrent/impl
parent47652e692a5bdcbc18de2881e86267d37757751d (diff)
downloadscala-7e0b9e8effaebbb6413e4cc63789b8f86428a684.tar.gz
scala-7e0b9e8effaebbb6413e4cc63789b8f86428a684.tar.bz2
scala-7e0b9e8effaebbb6413e4cc63789b8f86428a684.zip
Changing to scala.concurrent.context. as namespace for the system properties for the global execution context
Diffstat (limited to 'src/library/scala/concurrent/impl')
-rw-r--r--src/library/scala/concurrent/impl/ExecutionContextImpl.scala11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
index 6c4145e2d5..98f821652f 100644
--- a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
+++ b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
@@ -59,15 +59,14 @@ private[scala] class ExecutionContextImpl private[impl] (es: Executor, reporter:
def range(floor: Int, desired: Int, ceiling: Int): Int =
if (ceiling < floor) range(ceiling, desired, floor) else scala.math.min(scala.math.max(desired, floor), ceiling)
- val minThreads = getInt("scala.concurrent.ec.minThreads", _.toInt)
- val maxThreads = getInt("scala.concurrent.ec.maxThreads", _.toInt)
- val numThreads = getInt("scala.concurrent.ec.numThreads", {
+ val desiredParallelism = range(
+ getInt("scala.concurrent.context.minThreads", _.toInt),
+ getInt("scala.concurrent.context.numThreads", {
case null | "" => Runtime.getRuntime.availableProcessors
case s if s.charAt(0) == 'x' => (Runtime.getRuntime.availableProcessors * s.substring(1).toDouble).ceil.toInt
case other => other.toInt
- })
-
- val desiredParallelism = range(minThreads, numThreads, maxThreads)
+ }),
+ getInt("scala.concurrent.context.maxThreads", _.toInt))
val threadFactory = new DefaultThreadFactory(daemonic = true)