首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

AutoResetEvent、ManualResetEvent能否用于进程通信?解决方法

2012-03-23 
AutoResetEvent、ManualResetEvent能否用于进程通信?c++的CreateEvent就可以,c#的AutoResetEvent、ManualRes

AutoResetEvent、ManualResetEvent能否用于进程通信?
c++的CreateEvent就可以,c#的AutoResetEvent、ManualResetEvent可以吗
为什么AutoResetEvent、ManualResetEvent没有名字这个参数?

[解决办法]
AutoResetEvent和ManualResetEvent只是极其简单地继承EventWaitHandle。

要带命名事件可以直接用EventWaitHandle(和C++CreateEvent内部机理相同):
new EventWaitHandle(false, EventResetMode.AutoReset, "MyNamedEvent");

热点排行