Added parameter to allow configure number of working threads in thread pool.