script engine is not waiting for timers to expire before stopping

Bug #1660488 reported by Be on 2017-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
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.

Be (be.ing) on 2017-11-19
Changed in mixxx:
importance: Undecided → Low
Be (be.ing) wrote :

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 QCoreApplication::processEvents to avoid blocking the Qt event loop, but IIUC that still uses 100% of the CPU... https://stackoverflow.com/a/11487434

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers