Skip to content

Option to limit concurrency #82

@faximan

Description

@faximan

jobs==0 means "no limit concurrency.", which seems to be the case reading https://github.com/keith/rules_multirun/blob/e2245c6a4e1fb26cea7db6fac16d856693cf1ec1/internal/multirun.py:

processes = [
        (command, _run_command(command, block=False, **kwargs))
        for command
        in commands
    ]

We are considering using this in a deployment job to run hundreds of targets, each releasing a single build artifacts to some external store, but we don't want to spawn hundreds of processes in parallel. It would be great if the parallelism was configurable, or default limited to e.g. the number of CPU cores.

https://stackoverflow.com/questions/9808714/control-the-number-of-subprocesses-using-to-call-external-commands-in-python has some implementation ideas for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions