Nevermind, I figured it out. There's a lovely bit of code in
scala/collection/parallel/package.scala:
private[parallel] def getTaskSupport: TaskSupport =
if (scala.util.Properties.isJavaAtLeast("1.6")) {
val vendor = scala.util.Properties.javaVmVendor
if ((vendor contains "Oracle") || (vendor contains "Sun") || (vendor contains "Apple")) new ForkJoinTaskSupport
else new ThreadPoolTaskSupport
} else new ThreadPoolTaskSupport
If I change that to just
private[parallel] def getTaskSupport: TaskSupport = new ForkJoinTaskSupport
the parallel-collections test passes on Avian and HotSpot. However, if I
change it to
private[parallel] def getTaskSupport: TaskSupport = new ThreadPoolTaskSupport
it hangs on both Avian and HotSpot. In other words, the test simply won't
complete when using ThreadPoolTaskSupport, regardless of the VM, which
means the test can only pass if the VM vendor is Oracle, Sun, or Apple.
Ouch.
Hi,
while Joel and I bootstrapped and tested Scala on Avian, we both encountered that the test suite hangs in test/files/scalacheck/parallel-collections.
This seems to be a Scala issue, Joel discovered that the same also happens on Hotspot when using ThreadPoolTaskSupport:
I have increased the priority of SI-7237 to Critical, because if 2.11 starts using invokedynamic, we are basically stuck with a broken task support library until 2.10.2.
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Just a quick question, since we embed a modern version of FJP in the stdlib, why don't we just always use that?
Just a quick question, since we embed a modern version of FJP in the stdlib, why don't we just always use that?
Just a quick question, since we embed a modern version of FJP in the stdlib, why don't we just always use that?
Maybe Aleksandar knows more: https://github.com/scala/scala/commit/c9ae821b7702169147fe324eb160710623c16280
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Just a quick question, since we embed a modern version of FJP in the stdlib, why don't we just always use that?
Maybe Aleksandar knows more: https://github.com/scala/scala/commit/c9ae821b7702169147fe324eb160710623c16280
¹ By the way, what's the priority to choose in JIRA to not get an issue ignored that was marked as “affects 2.10.1-RC3”? :-)
The check was added, because earlier releases of J9 1.6 did not implement all methods of Unsafe used in the ForkJoinPool. At the time, we did our share of talking with the people responsible at IBM about completing Unsafe support. It's great that we don't need this check any more.