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
As I see now there is not possibility to compare these two types (Function inherits Value, and ThreadSafeFunction don't), are there any solutions for that? Thanks.
The text was updated successfully, but these errors were encountered:
You are correct. A Napi::Function holds a napi_value, whereas a Napi::ThreadSafeFunction holds a napi_threadsafe_function. They are inherently different, and you cannot compare them. Furthermore, not all TSFNs are created with a function passed to them: starting with N-API 5, the function parameter is optional.
If you want to compare the types, you will have to manually keep track of the Function passed to TSFN::New and compare that value instead.
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
As I see now there is not possibility to compare these two types (Function inherits Value, and ThreadSafeFunction don't), are there any solutions for that? Thanks.
The text was updated successfully, but these errors were encountered: