New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThreadPoolConfig.useForkJoin defaults to false on the new 1.7JDK #4960
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4960?orig=1 |
@SethTisue said: |
@axel22 said: |
@axel22 said: |
@retronym said (edited on Apr 12, 2013 1:30:40 PM UTC): scala> val cls = scala.collection.parallel.`package`.getClass
cls: java.lang.Class[_ <: object scala.collection.parallel.package] = class scala.collection.parallel.package$
scala> val fld = cls.getDeclaredField("tasksupport")
fld: java.lang.reflect.Field = private final scala.collection.parallel.TaskSupport scala.collection.parallel.package$.tasksuppo
scala> fld.setAccessible(true)
scala> val const = Class.forName("scala.collection.parallel.ForkJoinTaskSupport").getDeclaredConstructors.head
const: java.lang.reflect.Constructor[_] = public scala.collection.parallel.ForkJoinTaskSupport()
scala> const.setAccessible(true)
scala> val support = const.newInstance()
support: Any = scala.collection.parallel.ForkJoinTaskSupport@1d0c2dea
scala> fld.set(scala.collection.parallel.`package`, support) |
Unfortunately the vendor of the 1.7VM has changed from "Sun Microsystems Inc." to "Oracle Corporation". This means that the fork-join-pool is not enabled by default
See this code:
The fix is trivial
The text was updated successfully, but these errors were encountered: