From 2838ab478b82892010191a3417bec7911af9cf6a Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Mon, 6 May 2019 07:56:58 -0700 Subject: [PATCH] doc: add call-once note to napi_queue_async_work Add note to `napi_queue_async_work()` indicating that, upon successful return, it must not be called again with the same work item. Fixes: https://github.com/nodejs/node/issues/27217 PR-URL: https://github.com/nodejs/node/pull/27582 --- doc/api/n-api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index de56daf1c6fd56..c5e3ef4fbcc100 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -4060,7 +4060,8 @@ napi_status napi_queue_async_work(napi_env env, Returns `napi_ok` if the API succeeded. This API requests that the previously allocated work be scheduled -for execution. +for execution. Once it returns successfully, this API must not be called again +with the same `napi_async_work` item or the result will be undefined. ### napi_cancel_async_work