[Interest] Is it OK to emit from different thread?
Jérôme Godbout
godboutj at amotus.ca
Fri Nov 30 21:07:42 CET 2018
If you use automatic connection when doing this you will run into troubles and my be surprise by the signals sent from the thread execution (they will act like if they were sent from the Qthread creator and not the actual executing qthread and this is bad.
If you see some code where people tell they have to specify the queued connection manually, it smell like a QThread have been inherited to inline the run and they "fixed" the problem. I do a lot of Threading inside my application and I never inherit it and never had any problems with my thread either.
-----Original Message-----
From: Konstantin Tokarev <annulen at yandex.ru>
Sent: November 30, 2018 2:47 PM
To: Jérôme Godbout <godboutj at amotus.ca>; Alexander Dyagilev <alervdvcw at gmail.com>; interest at qt-project.org
Subject: Re: [Interest] Is it OK to emit from different thread?
30.11.2018, 22:40, "Jérôme Godbout" <godboutj at amotus.ca>:
<snip>
> Note: inheriting QThread is wrong practice and should probably never be done.
This advise is questionable
https://woboq.com/blog/qthread-you-were-not-doing-so-wrong.html
<snip>
--
Regards,
Konstantin
More information about the Interest
mailing list