Re: GUI Update Timer Detection
Posted: Fri Feb 11, 2022 8:57 am
If it works then fine but this thread started on the premise that you were encountering problems with that approach.
You are right, the timers are local to the module, but the GUI Timer isn't in anyway synced to screen refresh. It's just an asynchronous timer that CA named GUI Timer because handling GUI updates is the most common purpose of a timer thread - in order to offload GUI jobs from the ProcessSample() thread. In effect it's just a named timer that doesn't have a name parameter.
My comments reflect a more generalised view about the GUI Timer thread because in many of my modules that thread is used for lots of different tasks so switching it on and off would interfere with all manner of things.
So in a typical module there are three threads in operation - one in ProcessSample() and two in Notify() one being the GUI_Timer thread and a parallel thread that handles events like mouse, knob and button changes. Note that this means that Notify() can be effectively doing two things simultaneously. For instance the timer thread still works even if a dialog box is blocking the thread that's handling a button press.
You are right, the timers are local to the module, but the GUI Timer isn't in anyway synced to screen refresh. It's just an asynchronous timer that CA named GUI Timer because handling GUI updates is the most common purpose of a timer thread - in order to offload GUI jobs from the ProcessSample() thread. In effect it's just a named timer that doesn't have a name parameter.
My comments reflect a more generalised view about the GUI Timer thread because in many of my modules that thread is used for lots of different tasks so switching it on and off would interfere with all manner of things.
So in a typical module there are three threads in operation - one in ProcessSample() and two in Notify() one being the GUI_Timer thread and a parallel thread that handles events like mouse, knob and button changes. Note that this means that Notify() can be effectively doing two things simultaneously. For instance the timer thread still works even if a dialog box is blocking the thread that's handling a button press.