[Interest] Poor QMethod::invoke performance across threads on i.MX53

Matthew Woehlke mw_triad at users.sourceforge.net
Wed May 27 21:02:36 CEST 2015


On 2015-05-18 03:46, Thiago Macieira wrote:
> On Thursday 14 May 2015 18:18:52 Robert Daniels wrote:
>>         moveToThread(this);
> 
> This is wrong. Never do "moveToThread(this)", since it's very difficult to then 
> destroy the QThread object. This is unrelated to the problem and it's probably 
> only for simplicity of your testcase.

Sort of OT, but... why? If the object in question is destroyed by the
same thread that created it, after the thread that the object
"represents" has terminated cleanly, what is the problem?

(I have my own code that is potentially affected by this... I'm not
doing a *literal* self-owning object, but I have an object which "owns"
a thread and "lives" on that same thread. I don't try to destroy said
object from "its" thread, however, but rather the thread that created
the object.)

-- 
Matthew




More information about the Interest mailing list