tag:blogger.com,1999:blog-5641305413344798631.post5170712367561529062..comments2022-07-28T16:41:26.796-07:00Comments on Doug T's Blog: When a QThread isn't a thread...Anonymoushttp://www.blogger.com/profile/12368045907918241361noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5641305413344798631.post-11569114921758452192013-08-20T09:25:56.836-07:002013-08-20T09:25:56.836-07:00usleep will block and not reenter the event queue ...usleep will block and not reenter the event queue for the thread. Thus other signals won't get fired for the thread, so its frequently not realistic to call self.usleep(1000) while processing another signal.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5641305413344798631.post-23450442026457825672013-08-20T08:50:28.818-07:002013-08-20T08:50:28.818-07:00I am new to threading and struggling to find a *re...I am new to threading and struggling to find a *real* example that actually does something (I am trying to move a directory of files).<br /><br />It would be -excellent- if you could give a complete working example.<br /><br />Please?Anonymoushttps://www.blogger.com/profile/16522423343902334900noreply@blogger.comtag:blogger.com,1999:blog-5641305413344798631.post-29900401791312145662013-08-09T22:28:57.365-07:002013-08-09T22:28:57.365-07:00I think the general information about the thread a...I think the general information about the thread affinity of the QThread is great. But I can't help thinking how much the example you use doesn't make sense. Why would you use a QTimer and an event loop in the thread to do work at intervals? Why wouldn't you just loop, call doWork() and then self.usleep(1000)?<br />Maybe if the goal was to show a signal slot example from a thread, you might have used a more realistic use case?<br />Just something I kept thinking as I read through. Justin Israelhttps://www.blogger.com/profile/10268673898467425431noreply@blogger.com