mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: tidy some addons.md text
PR-URL: https://github.com/nodejs/node/pull/34654 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
5846befacb
commit
d05f615896
1 file changed
+4
-4
+4
-4
@@ -258,14 +258,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`:
|
||||
|
||||
|
||||
Reference in new issue
Block a user