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