From a1b9d7f42ea4910149eea30a82c843df453deb53 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 6 Aug 2020 16:38:11 -0700 Subject: [PATCH] doc: tidy some addons.md text PR-URL: /~https://github.com/nodejs/node/pull/34654 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca --- doc/api/addons.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/addons.md b/doc/api/addons.md index 195f28839d5ac9..36d3922b795bce 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -256,14 +256,14 @@ void AddEnvironmentCleanupHook(v8::Isolate* isolate, ``` This function adds a hook that will run before a given Node.js instance shuts -down. If necessary, such hooks can be removed using -`RemoveEnvironmentCleanupHook()` before they are run, which has the same -signature. Callbacks are run in last-in first-out order. +down. If necessary, such hooks can be removed before they are run using +`RemoveEnvironmentCleanupHook()`, which has the same signature. Callbacks are +run in last-in first-out order. If necessary, there is an additional pair of `AddEnvironmentCleanupHook()` and `RemoveEnvironmentCleanupHook()` overloads, where the cleanup hook takes a callback function. This can be used for shutting down asynchronous resources, -for example any libuv handles registered by the addon. +such as any libuv handles registered by the addon. The following `addon.cc` uses `AddEnvironmentCleanupHook`: