Skip to content

ForkJoinPool's parallelism is 0 #432

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

Closed
Ccixyj opened this issue Jul 11, 2018 · 3 comments
Closed

ForkJoinPool's parallelism is 0 #432

Ccixyj opened this issue Jul 11, 2018 · 3 comments
Assignees
Labels

Comments

@Ccixyj
Copy link

Ccixyj commented Jul 11, 2018

I use coroutines on an android virtual device with one cpu only , but find common pool not execute code. finally , i find something like this
image

@elizarov
Copy link
Contributor

Omg. That's bad. We should figure out how to detect this case and work around it. This might explain #288 too

@elizarov elizarov added the bug label Jul 11, 2018
@elizarov elizarov self-assigned this Jul 11, 2018
elizarov added a commit that referenced this issue Jul 11, 2018
@qwwdfsad
Copy link
Member

qwwdfsad commented Jul 11, 2018

So it appears that older versions of android SDK have a off-by-one error in makeCommonPool when runtime has only one core: https://github.com/AndroidSDKSources/android-sdk-sources-for-api-level-21/blob/master/java/util/concurrent/ForkJoinPool.java#L3278

@Ccixyj
Copy link
Author

Ccixyj commented Jul 12, 2018

the patch works well !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants