Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Cooperative cancel and FINALIZE ledger. One-shot lifecycle: INIT → EXECUTA → FINALIZE → EXIT.

§Flow

  1. Lifecycle::new creates cancel token and resource ledger
  2. Commands may mark Chrome PID / profile in ResourceLedger
  3. Lifecycle::finalize is idempotent and safe to call multiple times
  4. Drop also calls finalize as a safety net

§Safety

On Unix, finalize may send SIGTERM/SIGKILL to a recorded Chrome PID as last resort when primary Browser.close reap did not clear the ledger.

Structs§

Lifecycle
Runtime token for cooperative cancel and FINALIZE.
ResourceLedger
Ledger of resources owned by this invocation (browser, profile, temp dirs).