Commit d35af56e authored by Gireesh Punathil's avatar Gireesh Punathil
Browse files

src: shutdown node in-flight

This commit introduces a `node::Stop()` API.

An identified use case for embedders is their ability to tear down
Node while it is still running (event loop contain pending events)

Here the assumptions are that (i) embedders do not wish to resort to
JS routines to initiate shutdown (ii) embedders have the Environment
handle handy. (iii) embedders stop Node through a second thread.

Fixes: https://github.com/nodejs/node/issues/19365
Refs: https://github.com/nodejs/user-feedback/issues/51

PR-URL: https://github.com/nodejs/node/pull/21283


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarMichael Dawson <Michael_Dawson@ca.ibm.com>
parent 22de2cfb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment