You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stream hooks are unbounded and unordered: a slow start hook can outlive its stop hook #33
Stream hooks are spawned and never ordered against each other, so a start hook that runs long can finish after the stop hook of the same stream and leave an amplifier on while the player is idle — the exact failure the hooks exist to prevent.
HookRunner::run() (src/hooks.cpp) forks per event and returns immediately; poll() reaps with WNOHANG from the main loop. Nothing serialises the pair, and nothing bounds how many children may be outstanding, so repeated stream transitions with a hook that hangs accumulate processes until something runs out.
Not blocking today: the documented hook is a one-shot amixer, which finishes in milliseconds. It becomes real for anything that talks to a network relay or sleeps.
The shape of a fix, without giving up the "nothing waits on a hook" property that made the current design right:
Serialise per player: one hook at a time, later events queued rather than forked immediately.
Coalesce the queue — a start followed by a stop while the start is still running should collapse to the final state, not run both in order.
Bound the queue, and say so in the log when an event is dropped.
Raised by Copilot on #29 against src/hooks.cpp:110; the code is #28's, so it belongs here rather than on that PR.
Activity