gdk rt: XAsyncCancel leaves completion to the provider, GetResult errors end the call, never-started blocks (4 conformance scenarios) #321
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!321
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/321/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?
@QuentinDanblon on GitHub · 2026-11-23 18:40 UTC · original
QuentinDanblon:pr/xasync-reference-gaps→main· +591 −50 · 5 files · 4 commits · closed without mergingLibrary / area:
compat-commonGDK runtimert.rs(XAsync only, no XTaskQueue code), conformance scenarios intests/support/xtq.rs,DIFFERSingdk_xtaskqueue_conformance.rs, one assertion ingdk_minecraft_slots.rs.Exports changed (exports.txt rows): none
Source of the behaviour: measured on the PC
xgameruntime.dll10.0.26100.9656 with the existing conformance harness (each scenario runs on the PC runtime and on ours). Cross-checked with microsoft/libHttpClient (MIT),Source/Task/AsyncLib.cppat c5007fd9. No code taken.Stacked on #210 and #271, which you applied locally: the branch carries their three commits (cherry-picked unchanged) and one new commit,
a3e827a. Once they are on main, onlya3e827aremains.What changes (each confirmed on the PC runtime first)
XAsyncCancelE_ABORT, skipped DoWork, ran Cleanup inside the Cancel opE_ABORTif still pendingE_ABORTwithout the Cancel opS_OKforGetStatus(wait or not),GetResultSize(0),GetResult(used 0). Status fieldE_PENDING:E_PENDINGwithout wait,E_INVALIDARGwith waitE_INVALIDARGeverywhereXAsyncGetResulterrorsE_INVALIDARG, short bufferE_NOT_SUFFICIENT_BUFFER; each error ends the call (Cleanup, thenE_ILLEGAL_METHOD_CALLon a correct retry)Three
DIFFERSrows leave:verify_cancellation,verify_cleanup_waits_for_work,verify_cleanup_waits_for_work_distributed.gdk_minecraft_slots: the XGameUi text-entry result size on a zeroed block asserted a failure, i.e. the old behaviour. On the PC runtime it isS_OKand size 0 for IIDsfc0b9bd0,72c4e70fand6eeaa73e(measured with a temporary probe, not committed), so the assertion now expects that.Checked, already identical, unchanged:
XAsyncBeginon a terminated queue (E_ABORT), on a block in use (E_INVALIDARG), without any queue (E_NO_TASK_QUEUE);XAsyncBeginreturningS_OKwhen the Begin op fails.Not covered, not claimed
verify_terminate_waits_for_async_in_flightpasses on the PC and still fails here. The fix belongs inq_terminate, which #270 and #307 rewrite, so it is left for after them.E_NOT_SUPPORTED(a successful call with a state and no payload) cannot be reached through the API on either runtime; not implemented.Tests
On
a3e827a, Windows 11:gdk_xtaskqueue_conformance(ours): 67 passed, 6 runs in a row.gdk_xtaskqueue_conformance_real(PC runtime): 67 passed, 6 runs in a row. A first version ofverify_result_errors_end_the_callfailed 1 run in 4 on the PC because Cleanup lands slightly later there; the scenario now waits up to 2 s for it.TOMBOX_XTQ_ALL=1, the three removedDIFFERSrows pass.verify_pending_begin_stays_pendingandverify_periodic_patternfail in that mode with or without this change and pass alone: the otherDIFFERSscenarios running in parallel disturb them.--liband everygdk_*test of compat-common pass.iat::tests::finds_the_bound_slot_of_an_import_of_this_binaryfailed once under load and passed alone; not touched here.E_INVALIDARG, null identity accepted, errors not ending the call, result-read flag set only on success. Each makes its scenario fail.pr_gate.py --base origin/main: 0 problems.Conflicts to expect with #270 and #307: line additions and removals in
DIFFERSand in thextq_tests!list only, no logic overlap.cargo test -p compat-commonpasses for what is listed above🤖 Generated with Claude Code
@omonkeyz on GitHub · 2026-11-25 13:49 UTC · original
Applied on main in
8050509(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed