Skip to content

[backport] SI-7391 Always use ForkJoin in Scala actors #2413

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

Merged
merged 1 commit into from
May 3, 2013
Merged

[backport] SI-7391 Always use ForkJoin in Scala actors #2413

merged 1 commit into from
May 3, 2013

Conversation

soc
Copy link
Contributor

@soc soc commented Apr 19, 2013

... on Java 6 and above.

Like SI-7236 and SI-7237, the logic in
scala.actors.scheduler.ThreadPoolConfig.useForkJoin
(which resulted in a different thread pool implementation
being chosen) was causing random hangs in the test
concurrent-stream.scala when running on Avian.

@adriaanm
Copy link
Contributor

adriaanm commented May 1, 2013

review by @phaller

@@ -37,17 +37,5 @@ private[actors] object ThreadPoolConfig {
if (preMaxSize >= corePoolSize) preMaxSize else corePoolSize
}

private[actors] def useForkJoin: Boolean =
try !propIsSetTo("actors.enableForkJoin", "false") &&
(propIsSetTo("actors.enableForkJoin", "true") || {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still honor the actors.enableForkJoin system property. It should be possible to explicitly not use the ForkJoinPool by setting actors.enableForkJoin to false. Especially, since this PR targets 2.9.x. So, why not simply drop all the vendor checks in the Boolean expression below?

... on Java 6 and above, but keep honoring the
actors.enableForkJoin system property.

Like SI-7236 and SI-7237, the logic in
scala.actors.scheduler.ThreadPoolConfig.useForkJoin
(which resulted in a different thread pool implementation
being chosen) was causing random hangs in the test
concurrent-stream.scala when running on Avian.
@soc
Copy link
Contributor Author

soc commented May 2, 2013

@phaller Updated!

@phaller
Copy link
Contributor

phaller commented May 2, 2013

LGTM

adriaanm added a commit that referenced this pull request May 3, 2013
[backport] SI-7391 Always use ForkJoin in Scala actors
@adriaanm adriaanm merged commit 0f5b1e8 into scala:2.9.x May 3, 2013
bishabosha pushed a commit to scalacenter/scala that referenced this pull request Jun 26, 2020
[backport] SI-7391 Always use ForkJoin in Scala actors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants