Skip to content

Expose pending-job cancellation in sys bindings - #768

Draft
undy-aeon wants to merge 3 commits into
DelSkayn:masterfrom
tzfm:discard-pending-jobs-upstream
Draft

undy-aeon wants to merge 3 commits into
DelSkayn:masterfrom
tzfm:discard-pending-jobs-upstream

Conversation

@undy-aeon

@undy-aeon undy-aeon commented Sep 24, 2026 •

Copy link
Copy Markdown

Issue # (if available)

Depends on quickjs-ng/quickjs#1745.

Description of changes

Expose JS_DiscardPendingJobs in the platform bindings so hosts can release queued jobs without executing callbacks or destroying the runtime.

Tests cover empty and repeated discard, callback suppression, argument finalization, and runtime reuse. They also verify that jobs enqueued by native finalizers remain pending and that the returned count covers only the original queue.

This remains a draft until the engine API merges and the QuickJS submodule advances. The committed submodule is unchanged.

Validation on the latest upstream baseline, with the dependent engine patch applied locally: all 231 tests and doc tests in cargo test --all --no-default-features --features full-async passed on macOS, along with cargo fmt --all -- --check and cargo clippy --all --all-targets --features full-async,bindgen -- -D warnings.

Checklist

  • Added change to the changelog
  • Created unit tests for my feature if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant