Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Concurrency key lifecycle policy for run execution boundaries.

This module implements the concurrency key acquire and release policy:

  • Keys are acquired when a run transitions to Running state (execution starts).
  • Keys are released when a run transitions to a terminal state.

The lifecycle logic uses the key gate contracts from key_gate module and does not add unrelated policy behavior.

Structs§

KeyLifecycleContext
Context for evaluating concurrency key lifecycle during a state transition.

Enums§

LifecycleResult
Result of a key lifecycle operation.

Functions§

acquire_key
Attempts to acquire the concurrency key for a run.
evaluate_state_transition
Determines the appropriate key lifecycle action based on a state transition.
release_key
Attempts to release the concurrency key for a run.