XAsync: a failing Begin fails the call, and E_PENDING does not complete #56
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!56
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/56/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?
@gefydev on GitHub · 2026-11-22 23:03 UTC · original
gefydev:xasync-begin-complete-contract→main· +45 −3 · 1 files · 1 commits · merged 2026-11-23 09:44 UTCTwo differences from libHttpClient's
AsyncLib.cppin howxasync.rsreports results:XAsyncBegin: when the provider's Begin fails, the call is completed with that error, and XCL also returned it fromXAsyncBegin. libHttpClient returnsS_OKthere: the caller gets the error once, through the block. A title that treats a failedXAsyncBeginas "nothing was started" and frees the block, or retries, does so on a block that was already completed (and whose completion callback may already be queued).XAsyncRunlikewise when its schedule fails.XAsyncComplete(b, E_PENDING, ...): libHttpClient returns without completing ("E_PENDING is special -- if you still have work to do don't complete"). XCL turned it intoE_FAILand completed the call, ending an operation the provider meant to keep running.Both now follow libHttpClient.
This is independent of #53 (which changes
XAsyncCancelin the same file); the two merge without conflicts.Validation
a_failing_begin_fails_the_call_not_xasyncbeginandcompleting_with_e_pending_does_not_complete. Onmainboth fail (XAsyncBeginreturnsE_FAIL; the status afterXAsyncComplete(E_PENDING)isE_FAILinstead ofE_PENDING).cargo test -p xcl --lib: 345 passed, 0 failed, on Windows GNU under Wine.@ivall on GitHub · 2026-11-23 09:45 UTC · original
Merged (
daa27b0). Follow-up ine38cb65:XAsyncScheduleon a terminated queue returnsE_ABORTlikeXTaskQueueSubmitDelayedCallbackafter #57, so with this PR such anXAsyncRun/ XCL operation fails through the block and its work never runs (testasync_work_on_a_terminated_queue_is_aborted).Tested on Windows 11 (RX 9070):
cargo test --workspacegreen (lib 351, e2e), and a 45 s Unicorn Overlord run on the release build (VFS hooks active, ~60 fps, clean exit). Thanks!