Skip to main content

LOCK_ORDER

Constant LOCK_ORDER 

Source
pub const LOCK_ORDER: &[&str];
Expand description

The order in which PlayerController’s locks may be nested.

A thread already holding one of these may only acquire a lock that appears later in this list. The order is not arbitrary — it follows the nesting the code already relies on:

  • repository and sleep_timer are taken by long-running decisions that go on to consult playback state, so they sit outermost.
  • backend outranks queue: “what is playing” is read before “what is next”, never the reverse.
  • event_emitter is last. Emitting is a leaf — notifying the frontend must never reach back for more player state.

TRACES: UR-005 | DR-052