Skip to content

Misleading description for "Max Threads" #10225

Open
@BenLubar

Description

@BenLubar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:class referenceIssues and PRs about the class reference, which should be addressed on the Godot engine repositorybug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions