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

Support async_hooks on Node.js #27

Merged
merged 9 commits into from
Jan 23, 2023
Merged

Support async_hooks on Node.js #27

merged 9 commits into from
Jan 23, 2023

Conversation

toyobayashi
Copy link
Owner

@toyobayashi toyobayashi commented Jan 22, 2023

Add custom asynchronous operations API support and async_resource parameter of napi_create_async_work and napi_create_threadsafe_function on Node.js

  • napi_async_init
  • napi_async_destroy
  • napi_make_callback

return napi_generic_failure on browser or nodeBinding is not provided when initializing.

Module.emnapiInit({
  context,
  nodeBinding: require('@tybys/emnapi-node-binding')
})

napi_{open,close}_callback_scope can not be implemented because Node.js disallow mismatched callback scope after returning back to JavaScript.

@toyobayashi toyobayashi marked this pull request as ready for review January 23, 2023 15:35
@toyobayashi toyobayashi merged commit a99d6a4 into main Jan 23, 2023
@toyobayashi toyobayashi deleted the feat-node-async-hooks branch April 6, 2023 16:14
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

Successfully merging this pull request may close these issues.

1 participant