Add the function to limit the sub process number.