public static void Dispose(ManualResetEventHandle handle) { Tracing.Log(Tracing.Debug, "ManualResetEventHandle.Dispose(id={0:x8})", handle.id); // // Releasing the handle will allow the manual-reset event to be // garbage-collected. // Thread.CurrentProcess.ReleaseHandle(handle.id); }
public static bool Create(bool initialState, out ManualResetEventHandle handle) { unsafe { fixed(ManualResetEventHandle *handlePtr = &handle) { return(CreateImpl(initialState, handlePtr)); } } }
public static bool Set(ManualResetEventHandle handle) { // // Convert the handle to a manual-reset event; set the event. // ManualResetEvent mre = HandleTable.GetHandle(handle.id) as ManualResetEvent; bool ret = mre.Set(); Tracing.Log(Tracing.Debug, "ManualResetEventHandle.Set(id={0:x8})", handle.id); return(ret); }
public static bool Create(bool initialState, out ManualResetEventHandle handle) { // // Create a new manual-reset event, and a handle in the current // process to hold it. // handle = new ManualResetEventHandle( Thread.CurrentProcess.AllocateHandle( new ManualResetEvent(initialState))); Tracing.Log(Tracing.Debug, "ManualResetEventHandle.Create(state=, out id={0:x8})", handle.id); return(true); }
public static extern bool Set(ManualResetEventHandle handle);
public static extern void Dispose(ManualResetEventHandle handle);