Skip to content

Ability to shutdown Node in-flight #19365

Closed
@gireeshpunathil

Description

@gireeshpunathil
  • 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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.embeddingIssues and PRs related to embedding Node.js in another project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions