我的程序在执行到WaitHandle.WaitAll(events)时,会发生“不支持一个 STA 线程上多个句柄的 WaitAll”的异常
注:events是元素类型为AutoResetEvent的数组的引用,声明是AutoResetEvent[] events=new AutoResetEvent[4];
请问这是什么原因?
注:events是元素类型为AutoResetEvent的数组的引用,声明是AutoResetEvent[] events=new AutoResetEvent[4];
请问这是什么原因?
Thread thr = new Thread(new ThreadStart(方法));
thr.Start();