多线程 Semaphore
代码说明:
class Program { static void Main(string[] args) { Semaphore seamphore = new Semaphore(5, 5, "SemaphoreExample"); seamphore.WaitOne(); Console.WriteLine("Seamphore 1"); seamphore.WaitOne(); Console.WriteLine("Seamphore 2"); seamphore.WaitOne(); Console.WriteLine("Seamphore 3");
下载说明:请别用迅雷下载,失败请重下,重下不扣分!