private ManualResetEvent m_eventSend = new ManualResetEvent(false);
这样的一个声明是做什么的呀.有什么用呀.
还有就是他的m_eventSend.Set()和m_eventSend.Reset()方法是做什么用的!
通过它能不能启动事件呀!

解决方案 »

  1.   


     public static ManualResetEvent mre = new ManualResetEvent(false);
    ManualResetEvent建立时是把false作为start的初始状态,这个类用于通知另一个线程,让它等待一个或多个线程。注意,为了通知或监听同一个线程,所有的其它线程都能访问那个类。
    等待线程这样写:
      mre.WaitOne();
    这将引起等待线程无限期的阻塞并等待类来通知。发信号的线程应该这样:
      mre.Set();这样类就会被通知,值变成true,等待线程就会停止等待。在通知事件发生后,我们就可以使用下面语句把线程置于基状态:
      mre.Reset();
      

  2.   


    参考资料:http://www.cnblogs.com/BlueTzar/articles/864355.html