Allow changing maximum thread count