Commit 0c258bdc authored by Jason Ginchereau's avatar Jason Ginchereau Committed by Michael Dawson
Browse files

n-api: Context for custom async operations

 - Add napi_async_context opaque pointer type.
   (If needed, we could later add APIs for getting the async IDs
   out of this context.)
 - Add napi_async_init() and napi_async_destroy() APIs.
 - Add async_context parameter to napi_make_callback().
 - Add code and checks to test_make_callback to validate async context
   APIs by checking async hooks are called with correct context.
 - Update API documentation.

PR-URL: https://github.com/nodejs/node/pull/15189
Fixes: https://github.com/nodejs/node/issues/13254


Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 92e5f5cc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment