Results 1 to 11 of 11

Thread: Client-Server application using thread pool - implementation suggestions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Default Re: Thread Pool

    Quote Originally Posted by doctore View Post
    Now I have this problem: How can I pass the socket to the working_thread in order for it to process that request??
    Have you seen the ThreadedFortuneServer qt example. I think this is very similar.

  2. #2
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    2

    Default Re: Thread Pool

    Quote Originally Posted by yogeshgokul View Post
    Have you seen the ThreadedFortuneServer qt example. I think this is very similar.
    Thanks for your reply.

    But I don't think that the problems are very similar.

    The ThreadedFortuneServer, like the suggests uses threads, but in a different manner. For each new connection one new thread is created; the client request is answered and the thread terminates its execution.

    Now, what I want is something like this:

    One list of threads, that when there aren't any requests to process are sleeping (qwaitcondition). When a new request arrives one of the threads is awaken. The request is processed and the thread goes to sleep again.

Similar Threads

  1. Thread Ownership Problem
    By tntcoda in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 00:18
  2. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 13:36
  3. Replies: 5
    Last Post: 17th January 2008, 21:49
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 00:49

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.