Changes the fork join pool detection for JVM1.7, for actors and parallel collections libraries.

Review by phaller.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25989 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
prokopec 2011-11-11 16:59:45 +00:00
parent 9c9e71c1ec
commit 2c8d5f67f5
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ private[actors] object ThreadPoolConfig {
// 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"))
isJavaAtLeast("1.6") && ((javaVmVendor contains "Oracle") || (javaVmVendor contains "Sun") || (javaVmVendor contains "Apple"))
})
catch {
case _: SecurityException => false

View File

@ -42,14 +42,14 @@ package object parallel {
private[parallel] def getTaskSupport: TaskSupport =
if (util.Properties.isJavaAtLeast("1.6")) {
val vendor = util.Properties.javaVmVendor
if ((vendor contains "Sun") || (vendor contains "Apple")) new ForkJoinTaskSupport
if ((vendor contains "Oracle") || (vendor contains "Sun") || (vendor contains "Apple")) new ForkJoinTaskSupport
else new ThreadPoolTaskSupport
} else new ThreadPoolTaskSupport
val tasksupport = getTaskSupport
/* implicit conversions */
implicit def factory2ops[From, Elem, To](bf: CanBuildFrom[From, Elem, To]) = new FactoryOps[From, Elem, To] {
def isParallel = bf.isInstanceOf[Parallel]
def asParallel = bf.asInstanceOf[CanCombineFrom[From, Elem, To]]