diff options
Diffstat (limited to 'src/actors')
-rw-r--r-- | src/actors/scala/actors/scheduler/DefaultThreadPoolScheduler.scala | 2 | ||||
-rw-r--r-- | src/actors/scala/actors/scheduler/ThreadPoolConfig.scala | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/actors/scala/actors/scheduler/DefaultThreadPoolScheduler.scala b/src/actors/scala/actors/scheduler/DefaultThreadPoolScheduler.scala index 42942f9344..0e38d809e4 100644 --- a/src/actors/scala/actors/scheduler/DefaultThreadPoolScheduler.scala +++ b/src/actors/scala/actors/scheduler/DefaultThreadPoolScheduler.scala @@ -29,7 +29,7 @@ private[actors] class DefaultThreadPoolScheduler(daemon: Boolean) setDaemon(daemon) - def executor = { + var executor = { val workQueue = new LinkedBlockingQueue[Runnable] val threadFactory = new ThreadFactory { diff --git a/src/actors/scala/actors/scheduler/ThreadPoolConfig.scala b/src/actors/scala/actors/scheduler/ThreadPoolConfig.scala index a1bf35e0e1..12a24cd89f 100644 --- a/src/actors/scala/actors/scheduler/ThreadPoolConfig.scala +++ b/src/actors/scala/actors/scheduler/ThreadPoolConfig.scala @@ -39,14 +39,15 @@ object ThreadPoolConfig { } private[actors] def useForkJoin: Boolean = - try propIsSetTo("actors.enableForkJoin", "true") || { - Debug.info(this+": java.version = "+javaVersion) - Debug.info(this+": java.vm.vendor = "+javaVmVendor) - - // on IBM J9 1.6 do not use ForkJoinPool - // XXX this all needs to go into Properties. - isJavaAtLeast("1.6") && ((javaVmVendor contains "Sun") || (javaVmVendor contains "Apple")) - } + try !propIsSetTo("actors.enableForkJoin", "false") && + (propIsSetTo("actors.enableForkJoin", "true") || { + Debug.info(this+": java.version = "+javaVersion) + Debug.info(this+": java.vm.vendor = "+javaVmVendor) + + // on IBM J9 1.6 do not use ForkJoinPool + // XXX this all needs to go into Properties. + isJavaAtLeast("1.6") && ((javaVmVendor contains "Sun") || (javaVmVendor contains "Apple")) + }) catch { case _: SecurityException => false } |