Setting a thread's object name after calling start() is a data race.
QThreadPrivate::start() uses the thread's objectName() to set the thread name in pthread (PR_SET_NAME), so we must provide it before calling start. Given that AkThread calls start in the constructor, this means passing the string as a constructor argument. While at it, simplify code by using that string for both the object name of the AkThread (QObject) and the object name of its QThread. Detected by clang's thread-sanitizer. CCMAIL: dvratil@kde.org
parent
eb5cf0fa
Please register or sign in to comment