HLE: pin a call's task queue at XAsyncBegin #503
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/503"
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?
Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T04:16:08Z.
What
An XAsync call resolved its queue again at schedule and completion time. If
the title changed the process default between Begin and completion, work
submitted to the old queue could deliver its completion to the new one,
where the title may never dispatch it. This resolves the queue once at Begin,
retains it in the call, and uses it for work and completion. Starting a
provider with no available queue now returns
E_NO_TASK_QUEUEas GDKrequires, instead of completing inline and reporting success.
An AI tool wrote part of this change.
Tested
cargo test --workspace: 166 passed, 0 failed, 3 ignored. Two new hermetic tests: one starts a call with no queue through a test seam and checks the refusal; the other changes the block's queue mid-call and asserts both work and completion stay on the original manual queue.cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. No Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.Checklist
cargo xtask policypasses. No game files or data from them were added.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T12:18:38Z.
Review: APPROVED
Tested
3e4d52con Windows 11, RTX 5070, MSVC:cargo test -p victory-hle89 passed, includingbegin_without_a_task_queue_is_refusedand the pinned-queue test.XAsyncBeginand storing theArc<Queue>in the call means work and completion both go to the port the call started on, whatever the title changes afterwards. A missing queue returnsE_NO_TASK_QUEUE(0x800701AB,HRESULT_FROM_WIN32(ERROR_NO_TASK_QUEUE)) instead of starting a provider with nowhere to run.xasync.rs:1153, "value assigned toblockis never read", onblock.queue = second;in the test. The compiler sees the local written after&mut blockwas passed as a raw pointer and nothing in Rust reading it. Write through the same raw pointer (unsafe { (*ptr).queue = second }) so the test really changes what the runtime could read, and the warning goes away.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T17:31:05Z.
Verification ran against PR head
43710396895e6bce2ea3de27b96380f05ef4af51; the PR was open at refresh.cargo test -p victory-hle xasync: 8 passed;modules::xasync::tests::begin_without_a_task_queue_is_refusedfailed becausePINNED_COMPLETEDchanged from 0 to 1 between the snapshots.cargo test -p victory-hle xasync -- --test-threads=1: all 9 xasync tests passed, includingbegin_without_a_task_queue_is_refusedanda_call_keeps_the_queue_it_began_on.The first failure is a test-isolation race: both new tests share
PINNED_COMPLETED, so the queue-pinning test can increment it while the no-queue test asserts it is unchanged. Serial execution passes the queue-resolution and pinned work/completion checks.This verification was AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:22:12Z.
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-hle/src/modules/xasync.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.