script engine is not waiting for timers to expire before stopping
Bug #1660488 reported by
Be
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
New
|
Low
|
Unassigned |
Bug Description
If script timers are still running at the end of the script's shutdown function, they are not executed. This is an issue because some controllers cannot properly handle receiving MIDI messages to turn off every LED simultaneously.
Changed in mixxx: | |
importance: | Undecided → Low |
To post a comment you must log in.
I looked into this a bit, but I am unsure what the right way to implement this would be. Currently ControllerEngine uses QObject: :startTimer/ killTimer. I was hoping moving to using QTimer would help because QTimer already supports single shot timers and tracks whether timers are active. However, I'm still not clear how to make ControllerEngine wait for all single shot QTimers to finish executing. I have seen some examples that use a busy-wait loop that calls QCoreApplicatio n::processEvent s to avoid blocking the Qt event loop, but IIUC that still uses 100% of the CPU... https:/ /stackoverflow. com/a/11487434