-
-
Notifications
You must be signed in to change notification settings - Fork 493
Closed
Labels
Description
Napi::ThreadSafeFunction::New has a required Napi::Function parameter which I don't need in my use case. I can't use Napi::TypedThreadSafeFunction since I need to use a different callback across calls to [Non]BlockingCall().
https://github.com/nodejs/node-addon-api/blob/48e6b584a396ee5c42ef971c216139ad454f478b/doc/threadsafe.md states the following regarding Napi::ThreadSafeFunction:
This API is designed without N-API 5 native support for the optional JavaScript function callback feature. ::New methods that do not have a Function parameter will construct a new, no-op Function on the environment to pass to the underlying N-API call.
However, this doesn't appear to be the case.
I will gladly make a PR if this is something you're open to.