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

Misleading description for "Max Threads" #10225

Open
BenLubar opened this issue Nov 7, 2024 · 0 comments
Open

Misleading description for "Max Threads" #10225

BenLubar opened this issue Nov 7, 2024 · 0 comments
Labels

Comments

@BenLubar
Copy link

BenLubar commented Nov 7, 2024

Your Godot version: Godot v4.4.dev3 - Debian GNU/Linux trixie/sid trixie on X11 - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) Graphics (RPL-P) - 13th Gen Intel(R) Core(TM) i7-1360P (16 threads)

Issue description: The documentation says that this is a maximum and that the value of -1 means "no limit". However,

  • This value is used directly, so setting it to 128 will spawn 128 worker threads regardless of how many cores the user's system has.
  • -1 actually means "default thread count", not "unlimited", and on every platform but web, this is equal to the number of processor cores. On web, this is hard-coded to 1 for reasons unclear to me. (The function that returns the number of processor cores works fine on web and builds that don't support threads don't use this setting or function at all already.)

URL to the documentation page: https://docs.godotengine.org/en/latest/classes/class_projectsettings.html#class-projectsettings-property-threading-worker-pool-max-threads

@BenLubar BenLubar added the bug label Nov 7, 2024
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

1 participant