Review Request: Do not terminate threads

David Faure faure at kde.org
Thu Aug 11 22:37:28 BST 2011


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



kio/kio/hostinfo.cpp
<http://git.reviewboard.kde.org/r/102179/#comment5065>

    Ah, the wifi lost my comment here: the name "Petition" surprised me a lot, I couldn't see what this was about. I had to use an english dictionary to see that this was a synonym of Request, which is a much more common name for this.
    
    How about renaming to NameLookupRequest?



kio/kio/hostinfo.cpp
<http://git.reviewboard.kde.org/r/102179/#comment5066>

    m_lookups.insert(lookupId, petition); is faster (as recommended by Effective C++ iirc).


- David


On Aug. 11, 2011, 10:34 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. 11, 2011, 10:34 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 344b1d8 
> 
> 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/20110811/4bd14ff2/attachment.htm>


More information about the kde-core-devel mailing list