xtc/docs/decisions/0003-realtime-thread-rules.md

19 lines
617 B
Markdown
Raw Normal View History

2026-10-26 22:51:25 +01:00
# Decision 0003: Real-time thread rules
**Status:** Accepted
## Context
Audio glitches and unsafe graph changes can undermine the whole application.
## Decision
The audio callback performs bounded processing using preallocated resources.
It performs no allocation/free, blocking locks, file I/O, logging, GUI calls,
plugin loading, or waits. Graphs are prepared outside the callback and active
graph resources are retired only after safe reclamation.
## Consequences
Thread ownership and publication mechanisms must be documented and tested.
Any exception to these rules requires explicit evidence and review.