Review Request: Do not terminate threads

Albert Astals Cid tsdgeos at terra.es
Thu Aug 4 14:20:17 BST 2011



> On Aug. 4, 2011, 1:11 p.m., Thiago Macieira wrote:
> > Ok, then there's something wrong. QHostInfo has had a blocking method since Qt 4.0.

Can not use it since we have a timeout parameter. Thus we either need the thread (to use the blocking method and forget about the thread when the timeout hits) or the eventloop (to wait for the non blocking method and stop looping when the timeout hits).


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102179/#review5390
-----------------------------------------------------------


On Aug. 2, 2011, 11:30 a.m., Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102179/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2011, 11:30 a.m.)
> 
> 
> Review request for kdelibs and Dawit Alemayehu.
> 
> 
> Summary
> -------
> 
> Each time the terminate code triggers my Konqueror crashes, i'm substituting the terminate for just waiting the thread to finish and we just ignoring it.
> 
> The code has a race condition in which wait() returns false, then we switch to the thread and m_autoDelete is still not set and thus noone will delete the thread. I can add a mutex if you guys think this is unacceptable.
> 
> 
> Diffs
> -----
> 
>   kio/kio/hostinfo.cpp fef39fc 
> 
> Diff: http://git.reviewboard.kde.org/r/102179/diff
> 
> 
> Testing
> -------
> 
> When the 
> kDebug() << "Name look up for" << hostName << "failed";
> if triggers i do not get a crash anymore.
> 
> 
> Thanks,
> 
> Albert
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110804/9c64c2fe/attachment.htm>


More information about the kde-core-devel mailing list