Skip to content
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

Quick fix for #405 #408

Merged
merged 2 commits into from
Sep 1, 2020
Merged

Quick fix for #405 #408

merged 2 commits into from
Sep 1, 2020

Conversation

aclysma
Copy link
Contributor

@aclysma aclysma commented Sep 1, 2020

This is a quick fix for #405

  • Use saturating_sub to avoid overflow in core assignment to task pools
    • This is likely a permanent fix
  • Temporarily force 4 minimum threads to avoid examples stalling
    • It looks like thread pools are poorly behaved when they only contain a single thread. Forcing to 4 threads will get the examples running but likely the IO and async compute pools will not function properly. (Those pools are currently unused.) This is something to be addressed in a future change after having some more time to look into the root cause.

Tested on macOS by running locally:

  • Naturally with many logical cores
  • Forcing a max of 4 logical cores

- Temporarily force 4 minimum threads to avoid examples stalling
@karroffel karroffel added the C-Bug An unexpected or incorrect behavior label Sep 1, 2020
Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

This is good to go, but lets add the // TODO like @memoryruins suggested

@cart cart merged commit b91fd8a into bevyengine:master Sep 1, 2020
mrk-its pushed a commit to mrk-its/bevy that referenced this pull request Oct 6, 2020
- Use saturating_sub to avoid overflow in core assignment to task pools
- Temporarily force 4 minimum threads to avoid examples stalling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants