Task queues: a terminated queue takes no new work #57
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!57
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/57/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:taskqueue-submit-after-terminate→main· +33 −1 · 1 files · 1 commits · merged 2026-11-23 09:44 UTCXTaskQueueSubmitCallback,XTaskQueueSubmitDelayedCallbackandXTaskQueueRegisterWaiteraccept work on a queue afterXTaskQueueTerminate. That work then runs canceled, and a delayed callback runs after the termination callback has already told the title that the queue is done: a title that frees its context there gets a callback on freed memory. This happens, for example, with a callback that reschedules itself from its own canceled invocation during termination.libHttpClient rejects new work on a terminating or terminated port with
E_ABORT(TaskQueuePortImpl::VerifyNotTerminated, called fromQueueItemandRegisterWaitHandle). The three functions now do the same.E_ABORT_QUEUE_TERMINATEDis removed: it was unused, and its value (0x80040001) is notE_ABORT(0x80004004).Complements #54 (delayed callbacks already pending when the queue terminates); no conflicts between the two.
Validation
a_terminated_queue_takes_no_new_work. Onmainthe first submit afterTerminatereturnsS_OKinstead ofE_ABORT.cargo test -p xcl --lib: 344 passed, 0 failed, on Windows GNU under Wine.@ivall on GitHub · 2026-11-23 09:45 UTC · original
Merged (
eb8ed07). Extended toXAsyncScheduleine38cb65(it submitted through the internalsubmit_delayed, past the new check).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!