Keep other queues' tasks queued when terminating a composite queue #436
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!436
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-436"
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?
@ahmetbagci8 on GitHub · 2026-11-29 10:51 UTC · original
ahmetbagci8:fix/xasync-composite-terminate→main· +60071 −5436 · 206 files · 660 commits · closed without mergingSummary
Composite queues created with
XTaskQueueGetPort+XTaskQueueCreateCompositeshare the sameArc<Port>andport.tasksqueue. Previously,XTaskQueueTerminatecalledlock(&port.tasks).drain(..), which drained and canceled (task.run(true)) queued tasks submitted to other open queues sharing that port.Changes
Queuea uniqueid: u64and tag queued tasks inPort::taskswith their owning queueid.XTaskQueueTerminate, remove and cancel only tasks owned by the terminating queue, preserving other queues' tasks in FIFO order.terminating_a_composite_queue_leaves_other_queues_tasks_queued.Tested
cargo test -p victory-hle --lib xasync:17 passed; 0 failed; 0 ignoredcargo clippy -p victory-hle --tests: clean (0 warnings)@Kal0s-design on GitHub · 2026-11-29 11:20 UTC · original · reviewed
Ran this on Windows.
cargo test -p victory-hle --lib xasyncgives 17 passed, the new composite test included, andcargo clippy -p victory-hle --all-targets -D warningsis clean.The terminate path keeps other owners' tasks in FIFO order, it's all done under the one
port.taskslock, and the wake for waiting dispatches still comes after it, so the comment about nobody missing both the flag and the wake still holds. The ids come from a global counter, so a closed queue's id can't come back on a new one sharing the port.Heads-up: it conflicts with your #348, but only at the end of
mod tests, where both append a test. Whichever lands second just needs the two tests kept.AI-assisted: yes
@TaynanGT on GitHub · 2026-11-29 11:35 UTC · original
Thanks for checking FIFO order, owner isolation and the wake path. Keep both regression tests when reconciling the overlap with #348; the cancellation-generation fix and composite-queue termination fix should remain independently testable.
@TaynanGT on GitHub · 2026-11-30 17:07 UTC · original
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed