Thread: Thread pool

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    41

    Thread pool

    I need a thread pool that can handle a request queue. Is there an example somewhere how you make such a thing. It must have been made tons of those.

    An added request to the queue must make sure that at least one thread wake up to take care of the request. THe last thing a thread do before going to sleep is to check if the queue isn't empty.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Search the framework. I'm absolutely sure I've seen a thread pool class in there somewhere.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    41
    thanks!

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 01:17 PM
  2. Thread Pool libraries or examples
    By Mastadex in forum Windows Programming
    Replies: 6
    Last Post: 08-24-2008, 08:58 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. pointer to main thread from worker thread?
    By draegon in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2005, 06:35 AM
  5. Critical Sections, destroying
    By Hunter2 in forum Windows Programming
    Replies: 4
    Last Post: 09-02-2003, 10:36 PM