
----- Original Message ----- From: "vicente.botet" <vicente.botet@wanadoo.fr> To: <boost@lists.boost.org> Sent: Thursday, May 08, 2008 8:51 PM Subject: Re: [boost] [thread] cache of initialized threads
----- Original Message ----- From: "Darren Garvey" <darren.garvey@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, May 08, 2008 5:57 PM Subject: Re: [boost] [thread] cache of initialized threads
Hi vincent,
2008/5/8 vicente.botet <vicente.botet@wanadoo.fr>:
In addition a cached thread should behaves as much as possible as a thread. A thread_pool is much more a multi_task scheduler than a thread factory.
Maybe a thread_pool with the needed policies can give the same result. Why not? . Task type : provide the thread functionality . Scheduling Policy : immediate (Synchronous) . Size Policy creates a new one when no more available
Do you know a thread_pool library allowing to implement the required behaviour?
http://sourceforge.net/projects/threadpool
It looks like it's still being maintained. I've never really used it for anything proper, but it seems to do some of the things you're looking for.
Thanks Darren,
I'll take a look to see if I can use it.
Hi Darren, this is an interesting thread pool library, but I think that the main problem concerning my use case is that the schedule function do not returns a hadle to the thread that takes/will take in account the task, and so I have no mean to interrupt the task, join the task, and so one. I will look more deeply in the implementation to see if I can make some adaptations to reach my goals. Thanks again for the link. Has someone else other pointers? _____________________ Vicente Juan Botet Escriba