keith / rules_multirun

Bazel rules for running multiple commands in parallel in a single bazel invocation
Apache License 2.0
72 stars 15 forks source link

feat: Support concurrency limit #55

Open honnix opened 3 months ago

honnix commented 3 months ago

This is a PoC about how jobs can be used to control concurrency limit.

Currently jobs can either be 0 (no limit, spawn/fork as many as possible), or 1 (serial). This PR uses a thread pool to control the max number of concurrently running processes.

This PR also solves a deadlock when a child process outputs too much data that don't fit into output buffer.

honnix commented 3 months ago

@keith Could you please take a look at this and let me know what you think? Thanks.