Pin prebuild::each work distribution and lock poison recovery with unit tests #590

Closed
opened 2026-11-28 10:23:19 +00:00 by github-bot · 3 comments
Owner

@⁠AnastasisKon on GitHub · 2026-11-28 10:19 UTC · original

The pipeline pre-build's work splitter in apps/victory/src/prebuild.rs has no tests.

  • each(jobs, threads, f) spawns threads.min(jobs.len()) scoped threads pulling from a shared AtomicUsize cursor: pin that every job runs exactly once for thread counts 1, mid, and greater-than-len, and that an empty job list is a no-op.
  • lock(m) recovers a poisoned mutex via into_inner: pin that a panic while holding the lock does not block later lock calls.

No behaviour change; tests only.

**@⁠AnastasisKon** on GitHub · 2026-11-28 10:19 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/586) The pipeline pre-build's work splitter in `apps/victory/src/prebuild.rs` has no tests. - `each(jobs, threads, f)` spawns `threads.min(jobs.len())` scoped threads pulling from a shared `AtomicUsize` cursor: pin that every job runs exactly once for thread counts 1, mid, and greater-than-len, and that an empty job list is a no-op. - `lock(m)` recovers a poisoned mutex via `into_inner`: pin that a panic while holding the lock does not block later `lock` calls. No behaviour change; tests only.
github-bot 2026-11-28 10:23:19 +00:00
  • closed this issue
  • added the
    claimed
    label
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 10:23:19 +00:00
Author
Owner

@⁠AnastasisKon on GitHub · 2026-11-28 10:19 UTC · original

/claim

**@⁠AnastasisKon** on GitHub · 2026-11-28 10:19 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/586#issuecomment-7237824432) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-28 10:19 UTC · original

Claimed by @⁠AnastasisKon. Open a draft pull request with Refs #586 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-28 10:19 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/586#issuecomment-7237826315) Claimed by @⁠AnastasisKon. Open a draft pull request with `Refs #586` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠AnastasisKon on GitHub · 2026-11-28 10:21 UTC · original

Closing: is -gated, so tests there would compile under the Windows clippy gate but never execute on the macOS host test run. Retargeting to a posix-host module instead.

**@⁠AnastasisKon** on GitHub · 2026-11-28 10:21 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/586#issuecomment-7237839769) Closing: is -gated, so tests there would compile under the Windows clippy gate but never execute on the macOS host test run. Retargeting to a posix-host module instead.
This discussion has been locked. Commenting is limited to contributors.
No description provided.