实现思路:线程执行后进行阻塞,判断当前标记是否达到设置的并发数,如果未达到上限,执行队列中将继续增加线程:如已达到其余线程排队等候.实例代码: 注:其中用到Mutex与Interlocked两个与线程相关的类,需要加上 using System.Threading; 引用Threading命名空间. public class MutexTest { private static int poolFlag = 0; //声明标记 private const int amountThread = 1