Currently, the mass_timer event and the subsequence mass_timer_cb function are run in the main thread. This was originally done when we were initiating graceful shutdown X seconds after audio was no longer available on the named pipe AND it was believed that ending the main event loop needed to be done from within the main thread.
Since then we have changed functionality to initiate graceful shutdown on receipt of the STOP command on the command/metadata named pipe AND we have learned that we can break the main event loop from any thread.
So, it might be more appropriate to run the remaining functionality of the mass_timer_cb in the pipe thread rather than in the main thread.