Just checked the code. I do suggest to change lock to tryLock for QMutex. Works better because much more predictable with timeouts.