Skip to content

Run deferred BVH work if it is still queued - #1018

Open
dajiaohuang wants to merge 1 commit into
dimforge:masterfrom
dajiaohuang:fix/issue-1008-deferred-bvh-wait
Open

dajiaohuang wants to merge 1 commit into
dimforge:masterfrom
dajiaohuang:fix/issue-1008-deferred-bvh-wait

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

  • Keep a deferred BVH optimization task available until a Rayon worker claims it.
  • If the joining worker finds the task still queued, run it there; otherwise wait for the worker that claimed it.
  • Add a deterministic two-worker regression test that parks the other worker and checks the pending-work handoff.

This addresses the multi-worker hang reported in #1008. The report describes an intermittent failure and does not establish a rate for any worker count.

Validation

  • cargo test -p rapier3d --release --features parallel --lib deferred_bvh_join_runs_pending_work_when_other_worker_is_blocked (passed)
  • cargo test -p rapier3d --release --features parallel --test single_worker_deferred_bvh (passed)
  • cargo fmt --check (passed)
  • git diff --check (passed)

@sebcrozet sebcrozet added C-Bug Something isn't working P-High labels Sep 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Bug Something isn't working P-High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants