Bug #5780 :
- refactoring the code to handle as a centralized way a thread pool executor for which the number of threads is settable