Click here to Skip to main content Click here to Skip to main
content  A ThreadPool implementation  , 22 May 2005 Rate this:
Please Sign up or sign in to vote. This article describes a
ThreadPool implementation.   This article is about a thread
pool. A pool manages requests from clients. A request is a
pointer to a function or method, parameter for it, identity
number, and priority number. Management is storing requests from
clients and executing them in parallel by different threads. The
order of execution is by priority, this scheduler is non-
preemptive - when thread begins its execution nothing can stop
it.  This code includes interesting subjects like OOD and
polymorphism, multi-threading, synchronization, generic
programming (templates) and STL containers.  I attached the
source file of class pool and a simple main which shows how to
use it.   The interface of the pool class is very simple. It
contains only a few functions.    • In ctor it receives number
which limits the number of running threads in par