ReviewOS

zig-utils/zig-test-framework

Honor --jobs with a bounded parallel executor

#15
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

Parallel execution accepts a job count, but the current implementation starts one thread per test. The configured n_jobs value does not bound concurrency, which can exhaust resources in large suites.

Proposed work

  • Replace per-test thread creation with a bounded worker pool or equivalent scheduler.
  • Respect --jobs N exactly.
  • Choose a documented CPU-based default when jobs are omitted.
  • Preserve deterministic result reporting and thread-safe state updates.
  • Ensure hooks and nested suites have explicit concurrency semantics.

Acceptance criteria

  • Active test concurrency never exceeds the configured job count.
  • Tests verify limits for one, two, and default worker configurations.
  • Reporter events and final totals remain correct under concurrency.
  • Hook ordering and thread-safety expectations are documented.

Sign in to comment on this issue.