-
-
Notifications
You must be signed in to change notification settings - Fork 493
Updates for N-API async changes #10
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
napi-inl.h
Outdated
| } | ||
|
|
||
| template <typename T> | ||
| inline int Reference<T>::Ref() { |
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.
Either the type is wrong or result needs a typecast before returning.
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.
Fixed here and a few other places.
napi-inl.h
Outdated
| } | ||
|
|
||
| template <typename T> | ||
| inline int Reference<T>::Unref() { |
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.
Either the type is wrong or result needs a typecast before returning.
mhdawson
left a 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.
LGTM
boingoing
left a 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.
LGTM
|
@boingoing What is the plan for getting the async APIs into node? Anyway, I don't see any point in holding this PR until those changes land, because the current code in this repo references the old N-API async functions that never landed in node. So updating this repo won't make things any worse. |
Prepping the PR for these changes as well as the one which changes Agreed, no reason to hold on the changes in this PR here. |
Updates for pending changes in async APIs at nodejs/abi-stable-node#204, along with other recent changes.
napi_worktonapi_async_workenvparameter and return anapi_statusnapi_cancel_async_work()APIErrorobject for async work errors, rather than just an error message.napi_status