Thanks for your tip! :-)
... but I think I can't use your solution in my application.
The fact is that if I have 1000 requests of executions in a rush, I will have 1000
Thread running in the same time: this could be a problem because it increases the amount of Context Switch.
So if I know exactly the time of execution Te and the time of wait Tw and they are constant, the optimum thread pool size will be (1 + Tw/Te) so I can have a system that use 100% his resources without a relevant Context Switch. I have already done it.
BUT, if I have Tw not constant it will be a problem. I will have to calculate it! So I would like to know if someone know there are classes or solution to this already done in Internet.