build_runner: fix race condition in dispatch_deps capacity reservation

Move ensureUnusedCapacity inside the mutex call to prevent
a race condition where other worker threads could append to
memory_blocked_steps between checking the length and iterating.

repro branch: https://codeberg.org/erg/zig/src/branch/fix-30014-repro
check out that branch, and depending on if you have the fix-30014 patch or not,
it will either race condition or succeed

Fixes #30014
6b9125cbe6Doug Coleman committed on 12/22/2025, 2:11:05 AMparent8c5f731
1 file changedLine totals unavailable