Results 1 to 3 of 3

Thread: Terminating Multiple Running Threads?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Terminating Multiple Running Threads?

    I have a basic web server that accepts an incoming connection and starts a separate QThread to handle the request -

    Qt Code:
    1. void Server::incomingConnection(int socketDescriptor)
    2. {
    3. thread = new ServerThread(socketDescriptor, this);
    4. connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
    5. thread->start();
    6. }
    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?
    Last edited by PLan2010; 21st February 2011 at 21:23.

Similar Threads

  1. FTP Program using multiple Threads
    By neveffects in forum Qt Programming
    Replies: 5
    Last Post: 3rd January 2011, 05:33
  2. Replies: 0
    Last Post: 15th April 2010, 13:44
  3. Multiple threads with one QTcpSocket
    By xenome in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2010, 20:20
  4. Phonon on multiple threads
    By Savignon in forum Qt Programming
    Replies: 5
    Last Post: 6th March 2009, 22:17
  5. Waiting for multiple threads
    By Bebee in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2008, 17:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.