Set number of threads for P2(x, a)