private AutoResetEvent _autoResetEvent2 = new AutoResetEvent(true);//获取或设置本机操作系统句柄。
public void test()
{
_autoResetEvent2.WaitOne();// 阻止当前线程,直到当前 System.Threading.WaitHandle 收到信号。
………………//
_autoResetEvent2.Set();//将事件状态设置为终止状态,允许一个或多个等待线程继续。
}