-
-
Notifications
You must be signed in to change notification settings - Fork 482
tsfn: support direct calls to underlying napi_tsfn #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The implementation for this is based off previous napi meeting discussion, see #556 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like mentioned, this PR directly conflicts with #546 on the use of unique_ptr<napi_threadsafe_function>
vs napi_threadsafe_function
. It's a simple change to resolve, by changing *_tsfn
to _tsfn
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks reasonable to me @gabrielschulhof can you take a look at as well? |
doc/threadsafe_function.md
Outdated
|
||
napi_status Napi::ThreadSafeFunction::NonBlockingCall(void* data) const | ||
``` | ||
- `data`: Data to pass to `call_js_cb` specified when creating the tsfn via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `data`: Data to pass to `call_js_cb` specified when creating the tsfn via | |
- `data`: Data to pass to `call_js_cb` specified when creating the thread-safe function via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a nasty fight between 500s from GitHub's commit suggestion API and various force pushes, this is comment has been updated 👍
db3482b
to
74544ac
Compare
Hi @mhdawson / @gabrielschulhof dunno what to do for this build failure: https://travis-ci.com/nodejs/node-addon-api/jobs/253158482
|
@KevinEady I restarted the job. |
Hi @mhdawson just a reminder on landing this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just found some nits in test :P.
Landed as |
Fixes: #556