I have a basic web server that accepts an incoming connection and starts a separate QThread to handle the request -
void Server::incomingConnection(int socketDescriptor)
{
thread = new ServerThread(socketDescriptor, this);
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
thread->start();
}
void Server::incomingConnection(int socketDescriptor)
{
thread = new ServerThread(socketDescriptor, this);
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
thread->start();
}
To copy to clipboard, switch view to plain text mode
If, for example, I have ten download threads running at the same time and I want to stop them all - immediately - what method should I use to terminate all the threads?
Bookmarks