HLE: implement XTaskQueueRegisterWaiter and XTaskQueueUnregisterWaiter #1434
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1435"
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 fuzeofficlal on 2026-11-24T17:58:16Z.
Fixes #888.
Summary
XTaskQueueRegisterWaiterandXTaskQueueUnregisterWaiterand wire vtable slots20(0xa0) and21(0xa8) onXTaskQueue.WaitForMultipleObjects), wait for each dispatched callback to finish before re-arming manual-reset handles, purge queued waiter callbacks on unregister without deadlocking self-unregistering callbacks, and delivercanceled = trueonXTaskQueueTerminate.Verification
XTaskQueueTerminatecancellation.cargo test --workspace,cargo clippy --workspace --all-targets --all-features, andcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:28:06Z.
Automated triage for the maintainers.
Needs work. It merges cleanly. The PR wires slots 0xa0 and 0xa8 of the task-queue object (
crates/victory-hle/src/modules/xasync.rs) to a waiter implementation: a duplicated handle and a stop event, one OS thread per waiter inwaiter_loop, re-arming after each callback, and cleanup on unregister,XTaskQueueTerminateandQueue::drop. I read through the locking and found no deadlock. Self-unregistering from the callback, and dropping the last queue reference on the waiter thread, both skip the join correctly. What it needs:main, both slots go tomissing::<20>/missing::<21>, which logruntime method not implementedwith the slot. A log line showing the title calls 0xa0 would justify 500 lines and a thread per waiter. Without one, this adds runtime behaviour nobody has seen needed.XTaskQueueTerminatenow calls every registered waiter's callback once withcanceled = true, and the test pins that. Please point to public documentation or observed behaviour for that, because a waiter that was never signalled might also just be dropped silently.The same patch was first posted on a fork in #888 by another contributor. Please credit them, or say how the two relate.
CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T17:20:16Z.
Closing this PR: as noted in triage, adding the
XTaskQueue0xa0/0xa8implementation without title call-site logs is premature. Happy to revisit if a title hits those slots.Pull request closed