111,126
社区成员
发帖
与我相关
我的任务
分享
List<qqlist> thrList = new List<qqlist>();
public struct imglist
{
public Byte[] img;
public AutoResetEvent mre;
public bool New;
}
thrList[0].mre.Set();
ManualResetEvent mre = new ManualResetEvent(false);
ThreadPool.QueueUserWorkItem(param =>
{
Thread.Sleep(5000);
Console.WriteLine(1);
mre.Set();
});
ThreadPool.QueueUserWorkItem(param =>
{
Thread.Sleep(2000);
mre.WaitOne();
Console.WriteLine(2);
});