14class KDSoapThreadPool::Private
18 : m_maxThreadCount(
QThread::idealThreadCount())
26 ThreadCollection m_threads;
56 return d->m_maxThreadCount;
63 int minSocketCount = 0;
78 if (!bestThread || sc < minSocketCount) {
85 if (!chosenThread && bestThread && m_threads.count() == m_maxThreadCount) {
86 chosenThread = bestThread;
93 m_threads.append(chosenThread);
99void KDSoapThreadPool::handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server)
105 chosenThread->handleIncomingConnection(socketDescriptor, server);
112 sc +=
thread->socketCountForServer(server);
131 sc +=
thread->totalConnectionCountForServer(server);
139 thread->resetTotalConnectionCountForServer(server);
143#include "moc_KDSoapThreadPool.cpp"
int maxThreadCount() const
int totalConnectionCount(const KDSoapServer *server) const
void resetTotalConnectionCount(const KDSoapServer *server)
void setMaxThreadCount(int maxThreadCount)
KDSoapThreadPool(QObject *parent=0)
int numConnectedSockets(const KDSoapServer *server) const
void disconnectSockets(KDSoapServer *server)
T qobject_cast(QObject *object)
QThread * thread() const const
bool wait(QDeadlineTimer deadline)