Considering below code snippet for MyServer side
public void CreateEvent()
{
var serverReadyEvent = new EventWaitHandle(false, EventResetMode.AutoReset, "aaa");
}
After search from MSDN, the 3rd parameter of the ctor means
name
Type: System.String
The name of a system-wide synchronization event.
But I find that I can call the method CreateEvent for multiple times and without any exception, is this mean that there are multiple EventWaitHandle instances exist with the same name? Is this correct behavior?
And below is the code snippet on MyClient side
public void OpenEvent()
{
EventWaitHandle.OpenExisting("aaa");
}
If the CreateEvent was called in MyServer side for 2 times, then in the MyClient side which event will be opened after OpenEvent was called?