Skip to content

Commit

Permalink
doc: tidy some addons.md text
Browse files Browse the repository at this point in the history
PR-URL: #34654
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and codebytere committed Aug 9, 2020
1 parent 05100e1 commit a1b9d7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down

0 comments on commit a1b9d7f

Please sign in to comment.