xtaskqueue: preserve other work on shared ports #403
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!403
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/403/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lordon1a on GitHub · 2026-11-24 02:57 UTC · original
fix/xtaskqueue-shared-port-terminate→main· +88 −8 · 1 files · 1 commits · closed without mergingAI-assisted.
Problem
Composite
XTaskQueueinstances created viaXTaskQueueCreateCompositeshare underlyingPortobjects, butXTaskQueueTerminatedrained all pending tasks from every port on the terminating queue — canceling callbacks queued by other live queues sharing the same port. In addition, a delayed callback already accepted before termination could still be pushed onto a shared port afterterminatedwas set.Fix
PendingTaskentries with the owning queue'sArc<AtomicBool>cancellation flag.Port::submit, checkowner.load(Ordering::Acquire)under the port lock and immediately run late deliveries as canceled instead of enqueueing them.XTaskQueueTerminate, retain tasks owned by other queues on shared ports and cancel only tasks belonging to the terminating queue.modules::xasync::tests::terminating_one_queue_keeps_other_work_on_the_shared_port.Verification
cargo xtask policy:151 files okcargo test -p victory-hle xasync:6 passed; 0 failedcargo clippy -p victory-hle --all-targets: 0 warnings inxasync.rs@jeremygold02 on GitHub · 2026-11-24 04:31 UTC · original
Thanks @lordon1a for keeping shared-port work independent across queue termination. I tested head
4ee6efa4a0c686d1def48c4bfebd45caa0aa9d75with:Result: 1 passed, 0 failed (86 filtered out). The test terminates one async queue while another queue has work on the shared port and verifies the other work still completes. This is a synthetic XAsync test, not a title workflow.
Pull request closed