Closed
Description
- Version: All
- Platform: All
- Subsystem: uv, core
Scope: C++ applications that embed node as a shared library
Issue: Node's life cycle is designed around the event loop method uv_run that assumes exit only when the last handle is drained from the loop, while the embedder may have a larger life cycle in which node workload may be a small subset. For example, the embedder may want to recycle node in response to a shift in workload / configuration, even while the loop is filled with active handles. Current Node / libuv design does not provide such an on-demand exit route.
Proposal: Define a top level API (such as quiesce
) that gracefully shuts down the loop and returns from node::Start().