Reputation: 5108
Is there a cross platform .NET equivalent to Win32 SetEvent(int)
?
[DllImport("kernel32.dll")]
public static extern bool SetEvent(IntPtr hEvent);
Upvotes: 1
Views: 1278
Reputation: 77304
It's hard to answer this question without any context. The class ManualResetEvent
(Microsoft/Mono) should be present in .NET and Mono. It should handle all your basic needs with event signalling.
There are a lot of more sophisticated classes in System.Threading that may be of help.
Upvotes: 1
Reputation: 21927
Yes, use a ManualResetEvent
, and use the Set
and Reset
methods to control its signaled state.
Upvotes: 0