Use task pool to as many threads as there are cores