https://learn.microsoft.com/en-us/dotnet/api/system.threading.manualresetevent?view=net-6.0
I am having a hard time understanding the difference between Reset() and WaitOne().
What is the difference in these two if they are both blocking the thread.
https://learn.microsoft.com/en-us/dotnet/api/system.threading.manualresetevent?view=net-6.0
I am having a hard time understanding the difference between Reset() and WaitOne().
What is the difference in these two if they are both blocking the thread.
Set() and Reset() are used when you want to control other threads . WaitOne() is used by the threads that shall be synchronized.
BTW, you got the sentence wrong:
Reset()
Sets the state of the event to nonsignaled, causing threads to block.
It says "causing threads" = other threads, not the thread that is calling the method.