Skip to content

node: pair shutdown CancellationToken with its JoinHandle in one type #1853

Closed

Description

@yigitdot

The warming creditor and the receipt writer each return a (CancellationToken, JoinHandle<()>) pair that is then threaded through two different structs as independent fields (for the creditor: ChainHandlers and ShutdownHandles in crates/node/src/runtime/mod.rs).

Awaiting the handle without first cancelling the token hangs until every sink drops — and ClientHandler holds one. So correctness depends on two call sites roughly a hundred lines apart preserving an ordering that no type enforces. The shutdown code gets it right today.

A small WarmingCreditor { shutdown, handle } with a single shutdown().await would make the pairing structural, for both this and the receipt writer.

Pre-existing shape, surfaced by the #1803 review.

Activity

  1. added
    kind:chore
    area:node
    prio:low
    on Aug 26, 2026
  2. moved this from Backlog to Ready in deCDNon Aug 27, 2026
  3. moved this from Ready to In progress in deCDNon Aug 27, 2026
  4. moved this from In progress to Done in deCDNon Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:choreprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions