summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo_p.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-04-04 17:26:00 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-04-05 10:28:39 (GMT)
commita0ca845cd32178d789f4eeff602b283a290842b8 (patch)
treef87bf1099387f2df499826db00d7e3fa482065c3 /src/network/kernel/qhostinfo_p.h
parent3b395c6e45ed4f73503586e6b9a80bb11844d315 (diff)
downloadQt-a0ca845cd32178d789f4eeff602b283a290842b8.zip
Qt-a0ca845cd32178d789f4eeff602b283a290842b8.tar.gz
Qt-a0ca845cd32178d789f4eeff602b283a290842b8.tar.bz2
Thread safety for QHostInfo symbian implementation
Each thread needs at least one current request if it has any queued requests, this is to stop the queue stalling. When starting a queued request, start it in the same thread it belongs to When aborting a request from the wrong thread, just detach it (it will complete normally but the slot isn't connected, and then delete itself) Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/kernel/qhostinfo_p.h')
-rw-r--r--src/network/kernel/qhostinfo_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index bae6efa..8da0692 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -234,6 +234,7 @@ public:
~QSymbianHostResolver();
void requestHostLookup();
+ void abortHostLookup();
int id();
void returnResults();
@@ -301,6 +302,7 @@ public:
private:
void runNextLookup();
+ // this is true for single threaded use, with multiple threads the max is ((number of threads) + KMaxConcurrentLookups - 1)
static const int KMaxConcurrentLookups = 5;
QList<QSymbianHostResolver*> iCurrentLookups;