Skip to content
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

Do we need some additional AsyncWorker variants #373

Closed
mhdawson opened this issue May 17, 2019 · 9 comments
Closed

Do we need some additional AsyncWorker variants #373

mhdawson opened this issue May 17, 2019 · 9 comments
Milestone

Comments

@mhdawson
Copy link
Member

See nodejs/node-addon-api#473

@mhdawson mhdawson added this to the Milestone 11 milestone May 17, 2019
@gabrielschulhof
Copy link
Collaborator

During today's meeting @NickNaso and @gabrielschulhof agreed that it is reasonable to add node-addon-api equivalents to the Nan::AsyncWorker variants. We could implement them using napi_threadsafe_function.

@gabrielschulhof
Copy link
Collaborator

A proposal for an AsyncWorker that uses the Promise interface is made here: nodejs/node-addon-api#231 (comment)

@mhdawson
Copy link
Member Author

So we have an issue for ProgressWorker but not PromiseWorker. We need to open an issue in node-addon-api for creating a PromiseWorker equivalent.

@mhdawson
Copy link
Member Author

Seems like the only variant we need to prioritize ProgressWorker as Nan does not have PromiseWorker. Since we have nodejs/node-addon-api#473 I think we are good in terms of issues in the node-addon-api. We have tagged it as help needed for now.

@legendecas
Copy link
Member

Just found nodejs/node-addon-api#477 noted that node-addon-api would prefer additional packages on topics not just a wrapper of n-api. Would AsyncWorker variants be considered merely additions to node-addon-api usage patterns but not wrappers of n-api?

@mhdawson
Copy link
Member Author

@legendecas the exception for "additions" that we've made while developing node-addon-api is that in order to facilitate transition from nan to node-addon-api, if there is functionality in nan then we've tried to have corresponding functionality in node-addon-api where it makes sense.

@mhdawson
Copy link
Member Author

PR to add AsyncProgressWorker: nodejs/node-addon-api#529

@mhdawson
Copy link
Member Author

There is also AsyncProgressQueueWorker which should be addressed before we close this issue. It is part of nan so we should consider adding it to N-API as well.

This is a PR doing that: nodejs/node-addon-api#585

@mhdawson
Copy link
Member Author

PR landed, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants