napi_async_destroy


napi_status napi_async_destroy(napi_env env,
                               napi_async_context async_context); 
  • [in] env:调用 API 的环境。

    ¥[in] env: The environment that the API is invoked under.

  • [in] async_context:要销毁的异步上下文。

    ¥[in] async_context: The async context to be destroyed.

如果 API 成功,则返回 napi_ok

¥Returns napi_ok if the API succeeded.

即使存在挂起的 JavaScript 异常,也可以调用此 API。

¥This API can be called even if there is a pending JavaScript exception.