Comment 1 for bug 1660488

Revision history for this message
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