What's the equivalent methodology of ManualResetEvent
in native C++.
Although the below page gives some APIs for C++, it seems to be valid for C++\CLI, and Windows Runtime scenarios only.
http://msdn.microsoft.com/en-us/library/system.threading.manualresetevent(v=vs.110).aspx
My Operating System is Windows 8 (x64). IDE: Visual Studio 2012. I am working on a Windows application which has three layers: C#, C++\CLI, and C++ native. I required this feature in C++ native.
Even though I currently need it only for Windows environment, it would be useful to know solution even for the Linux environment.
AutoResetEvent and ManualResetEvent are used in threading and help us to manage synchronization using signals. For example, suppose there are 2 threads, Thread1 and Thread2 and 1 main thread created by the Main() method.
An AutoResetEvent resets when the code passes through event. WaitOne() , but a ManualResetEvent does not.
You can use CreateEvent to create an event object that you later signal with SetEvent and reset with ResetEvent. You can use a wait function to wait on an event object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With