You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented on next. Hermes' first-party Node-API provides napi_cancel_async_work (API/napi/hermes_napi_async_work.cpp, adopted in #372), and #398 supplies the cancel_work hook behind it: the item is removed from the worker pool queue under the same mutex the workers pop it with, and the napi_cancelled completion is delivered asynchronously on the JS thread — matching Node, where a cancelled complete callback still runs on a later tick. Work already picked up by a worker cannot be cancelled and surfaces napi_generic_failure, as in Node (packages/host/cpp/HermesNapiHost.cpp).
Covered by packages/node-addon-examples/tests/async (deterministic cancel-while-queued and cancel-of-running-work cases) and the Catch2 suite in packages/host/tests.