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

N-API support for EventHandler #657

Closed
demurgos opened this issue Dec 23, 2020 · 2 comments
Closed

N-API support for EventHandler #657

demurgos opened this issue Dec 23, 2020 · 2 comments

Comments

@demurgos
Copy link

demurgos commented Dec 23, 2020

Hi,
I am trying to port one of my packages from the legacy-runtime to the napi-runtime but I am currently blocked because the EventHandler constructor is not implemented.

What is the current status of EventHandler with the napi-runtime?

I've seen the PR#622: Threadsafe Handles and it seems like it would offer an alternative solution for use-cases involving EventHandler. Is it planned to supersede it?

In my use case I use EventHandler to notify JS when a tokio task completes.

@kjvalencik
Copy link
Member

@demurgos You are correct that Threadsafe Handles are meant to supersede EventHandler. We may implement EventHandler on top of it to help with migration, but if we do, it will be marked as deprecated and cause a compiler warning.

@kjvalencik
Copy link
Member

Part of the JsPromise/TaskBuilder RFC.

neon-bindings/rfcs#35

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

2 participants