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 by Hermes' first-party Node-API (API/napi/hermes_napi_tsfn.cpp, adopted in #372): the ref state is tracked per thread-safe function, and Hermes only reaches for the host's loop-ref hooks when the host provides them.
Worth recording the React Native semantics: the host deliberately leaves ref_loop / unref_loop null (packages/host/cpp/HermesNapiHost.cpp, #398). There is no libuv loop to release — the JS thread outlives every producer thread — so unref is accepted and tracked but cannot let a process exit early the way it does in Node.
Exercised by packages/node-addon-examples/tests/threadsafe-function (the port of Node's test_threadsafe_function).