Contributing a thread pool class

Hello, It seems that boost's "thread" library does not have a thread pool class. It does have a thread_group class but this class is has the following limitations: 1. It does not limit the number of threads created. 2. Threads added are not managed and raw pointers are used exposing the developer to memory leaks. 3. The API deals with threads and not "tasks" to be executed by a thread. As such I have developed a thread pool class which allows for: · A maximum number of "worker" threads to configured. · Arbitrary "tasks" to be submitted by any thread and executed by one of the worker threads. o Worker threads are created as and when needed. · Worker threads can terminate after being idle a configurable amount of time. o They will be re-created if needed afterwards. The amount of code is quite small (< 500 lines including blank lines, API usage document in the header file and comments) and just uses standard C++ and boost thread functionality. My question is, would the boost community be interested in such a contribution to the thread library? I apologize in advance if this is the Nth time such a contribution has been proposed and rejected. I have developed this while working for my employer (a French bank called Société Générale). I have my manager's support and am in the process of obtaining agreement from my employer to get permission to submit the thread pool class developed. Cheers, Gawain Bolton Domino Development ITEC/CTT/GEF/TED 17 cours Valmy 92 800 Puteaux France Telephone : +33 1 42 13 52 43 ************************************************************************* This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. ************ Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes par le secret professionnel. Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. *************************************************************************

It seems that boost's "thread" library does not have a thread pool class. ... My question is, would the boost community be interested in such a contribution to the thread library? I apologize in advance if this is
BOLTON Gawain wrote: the Nth time such a contribution has been proposed and rejected. FWIW, I've used Philipp Henkel's http://threadpool.sourceforge.net/ successfully in the past. Best regards, Gareth ************************************************************************ The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony to be in compliance with Sony's global policies and standards

Hello,
It seems that boost's "thread" library does not have a thread pool class. It does have a thread_group class but this class is has the following limitations:
1. It does not limit the number of threads created.
2. Threads added are not managed and raw pointers are used exposing the developer to memory leaks.
3. The API deals with threads and not "tasks" to be executed by a thread.
As such I have developed a thread pool class which allows for:
· A maximum number of "worker" threads to configured.
· Arbitrary "tasks" to be submitted by any thread and executed by one of the worker threads.
o Worker threads are created as and when needed.
· Worker threads can terminate after being idle a configurable amount of time.
o They will be re-created if needed afterwards.
The amount of code is quite small (< 500 lines including blank lines, API usage document in the header file and comments) and just uses standard C++ and boost thread functionality.
My question is, would the boost community be interested in such a contribution to the thread library? I apologize in advance if this is the Nth time such a contribution has been proposed and rejected.
I have developed this while working for my employer (a French bank called Société Générale). I have my manager's support and am in the process of obtaining agreement from my employer to get permission to submit the thread pool class developed.
such a library should also provide work-stealing and fork-join semantics
participants (3)
-
BOLTON Gawain
-
Oliver Kowalke
-
Sylvester-Bradley, Gareth