napi_delete_async_work
napi_status napi_delete_async_work(napi_env env,
napi_async_work work);
-
[in] env
:调用 API 的环境。¥
[in] env
: The environment that the API is invoked under. -
[in] work
:调用napi_create_async_work
返回的句柄。¥
[in] work
: The handle returned by the call tonapi_create_async_work
.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 释放先前分配的工作对象。
¥This API frees a previously allocated work object.
即使存在挂起的 JavaScript 异常,也可以调用此 API。
¥This API can be called even if there is a pending JavaScript exception.