[Interest] QThread, correct exit.
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Sat Sep 28 11:50:24 CEST 2013
On Sat, Sep 28, 2013 at 3:14 PM, Alexander Syvak <alexander.svk at gmail.com>wrote:
> Hello,
>
> how to correctly stop a QThread execution?
>
> I am using
> thread.quit();
>
> thread.terminate();
>
>
Don't terminate. Quitting and waiting should be sufficient.
> thread.wait(500);
>
> Without terminate() thread wait forever. Each thread is executing an event loop only (object is moved into thread).
>
>
Is there anything else the thread could be stuck on? Busy looping
somewhere? Waiting for a syscall?
HTH,
-mandeep
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130928/a3a7392a/attachment.html>
More information about the Interest
mailing list