----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/102179/#review5396 -----------------------------------------------------------
That makes sense. Then we need only one thread, one that runs the event loop so it can be notified of finished lookups. We definitely don't need one thread per lookup, since that thread will only sleep. - Thiago 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 > >