Revision d634bc0...

Go back to digest for 28th August 2011

Bug Fixes in KDE Base

Albert Astals Cid committed changes in [kdelibs/frameworks] kio/kio/hostinfo.cpp:

Do not terminate threads when doing dns lookups with timeout

patch based on dfaure and thiago's suggestions:

Thiago and I came up with a design like this:
* a single thread that makes async lookups. It's never blocked, it can always
almost immediately read new requests from a queue and start them.
* each request is encapsulated in a class that has the QString
but also a QSemaphore.
* the main thread can block using a timeout (QSemaphore::tryAcquire(timeout))
* the request class is stored using a shared pointer, so that it's only
deleted when neither the main thread nor the worker thread need it anymore
[otherwise the deletion is a problem, in the timeout case vs the normal case]

REVIEW: 102179
(cherry picked from commit a4871052d09eecd928666d482427abebb5f39c56)

File Changes

Modified 1 files
  • kio/kio/hostinfo.cpp
1 files changed in total