Unsolved what is thread affinity
-
I have read all about threadAffinity in Qtfrom all over google but i really do not understand what actually it is.what is meanning of "threadAffinity".please tell me based on your understanding.
-
-
@JonB i already read all these link.but i don't understand its proper meaning.
-
@JadeN001
I thoguht https://forum.qt.io/topic/58928/what-is-the-meaning-of-thread-affinity/2 from @JKSH made it clear:If the receiver QObject has an affinity for Thread B, then the slot function runs in Thread B.
You can change the QObject's thread affinity by calling QObject::moveToThread().It's a way of choosing which thread a
QObject
's slot functions run in. -
Hi
If you think of affinity as "belongs to/run on/in that context" it might make more sense.