Module lifecycle

Module lifecycle 

Source
Expand description

Lifecycle supervision and shutdown coordination. Lifecycle + supervision primitives.

This module provides a small set of std-only coordination helpers intended for long-running services:

§Contracts

  • These primitives coordinate control flow (shutdown / join), not data synchronization.
  • Child tasks must be written to observe shutdown and return in a bounded amount of time.
  • Supervisor::join_all drains the supervisor’s child list; it is intended to be called once.

Structs§

Shutdown
Shutdown coordinator.
ShutdownToken
A clonable shutdown token that tasks can poll or wait on.
Supervisor
A minimal supervisor that coordinates shutdown and tracks child threads.
SupervisorConfig
Supervisor configuration.