Skip to content
Commit 1ccd5f40 authored by David Faure's avatar David Faure
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment