C# 之 AutoResetEvent 锁
用来通知线程有一些事件已发生,从而启动后继任务的开始。
private static AutoResetEvent autoResetEvent = new(true);
autoResetEvent.WaitOne();
......
autoResetEvent.Set();
用来通知线程有一些事件已发生,从而启动后继任务的开始。
private static AutoResetEvent autoResetEvent = new(true);
autoResetEvent.WaitOne();
......
autoResetEvent.Set();