[Qt-interest] Example of "moveToThread (this)" idiom -- legal?
K. Frank
kfrank29.c at gmail.com
Sun Jan 2 16:18:01 CET 2011
Hi Mihail -
On Sun, Jan 2, 2011 at 6:01 AM, Mihail Naydenov <mlists at ymail.com> wrote:
> Without going through the example, I just wanted to remind you
>
> Qt itself uses moveToThred(this)
>
> (see QFilesystemWatcher implementation)
Good point. It looks like it uses the full "moveToThread (this)"
idiom: It derives from QThread, calls moveToThread (this),
and has signals ans slots.
> So, I am sure by definition moveToThred(this) is not illegal.
Yes, QFileSystemWatcher looks like a strong vote that
moveToThread (this) is technically legal.
> If there are any dangers or gotchas they must be documented and
> let the users decide what design approach is best suited for their needs.
>
> thanks
> MihailNaydenov
Thanks.
K. Frank
> ----- Original Message ----
>> From: K. Frank <kfrank29.c at gmail.com>
>>
>> Hello List!
>>
>> According to my understanding of the Qt threading model,
>> I believe that our so-called "moveToThread (this)" idiom is
>> technically legal. I'd like to get some feedback on whether
>> this is correct.
>> ...
More information about the Qt-interest-old
mailing list