File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ operations. Callback functions must statisfy the following signature:
179179typedef void (*napi_async_execute_callback)(napi_env env, void* data);
180180```
181181
182+ Implementations of this type of function should avoid making any N-API calls
183+ that could result in the execution of JavaScript or interaction with
184+ JavaScript objects. Most often, any code that needs to make N-API
185+ calls should be made in `napi_async_complete_callback` instead.
186+
182187#### napi_async_complete_callback
183188Function pointer used with functions that support asynchronous
184189operations. Callback functions must statisfy the following signature:
@@ -3322,7 +3327,14 @@ asynchronous workers. Instances are created/deleted with
33223327
33233328The `execute` and `complete` callbacks are functions that will be
33243329invoked when the executor is ready to execute and when it completes its
3325- task respectively. These functions implement the following interfaces:
3330+ task respectively.
3331+
3332+ The `execute` function should avoid making any N-API calls
3333+ that could result in the execution of JavaScript or interaction with
3334+ JavaScript objects. Most often, any code that needs to make N-API
3335+ calls should be made in `complete` callback instead.
3336+
3337+ These functions implement the following interfaces:
33263338
33273339```C
33283340typedef void (*napi_async_execute_callback)(napi_env env,
You can’t perform that action at this time.
0 commit comments