这是indexloc提供的服务,不要输入任何密码
Skip to content

Ability to set concurrency to max (equal to CPU cores) --concurrency=max #761

@moltar

Description

@moltar

Describe the feature you'd like to request

I am not an expert in this area, but I think it's counter-productive to set the concurrency to a higher number than there are CPU cores available for CPU-hungry processes, like tests and builds, as these processes would be competing for resources.

Thus, a default setting of 10 might be counter-productive in certain environments, like CI, where the number of cores can be lower.

For example, GitHub Actions only have 2 cores available for Windows and Linux, yet 3 for macOS.

Describe the solution you'd like

I think there should be a way to specify "max" or some other variation of that, that signals Turbo to sniff out the number of cores and set the concurrency to that value.

Describe alternatives you've considered

turbo run build --concurrency=$(node -r os -e 'process.stdout.write(os.cpus().length.toString())')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions