2 instantiations of SafeWaitHandle
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (2)
67_waitHandle = new SafeWaitHandle(value, true); 75get => _waitHandle ??= new SafeWaitHandle(InvalidHandle, false);
74 references to SafeWaitHandle
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
27[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeWaitHandle))]
netstandard (1)
netstandard.cs (1)
14[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeWaitHandle))]
PresentationCore (4)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (4)
50internal ByteRangeDownloader(Uri requestedUri, string tempFileName, SafeWaitHandle eventHandle) 70internal ByteRangeDownloader(Uri requestedUri, Stream tempStream, SafeWaitHandle eventHandle, Mutex fileMutex) 397private ByteRangeDownloader(Uri requestedUri, SafeWaitHandle eventHandle) 850private SafeWaitHandle _eventHandle; // event handle which needs to be raised to inform the caller that
PresentationFramework (1)
MS\Internal\Progressivity\IByteRangeDownloaderService.cs (1)
53SafeWaitHandle eventHandle);
System.Diagnostics.Process (3)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (2)
27private readonly SafeWaitHandle? _handle; 30internal SafeProcessHandle(int processId, SafeWaitHandle handle) :
System\Diagnostics\Process.Unix.cs (1)
964private SafeWaitHandle GetSafeWaitHandle()
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapAsyncResult.cs (1)
48public LdapAsyncWaitHandle(SafeWaitHandle handle) : base()
System.Private.CoreLib (56)
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.EventWaitHandle.cs (4)
17internal static partial bool SetEvent(SafeWaitHandle handle); 21internal static partial bool ResetEvent(SafeWaitHandle handle); 24internal static partial SafeWaitHandle CreateEventEx(IntPtr lpSecurityAttributes, string? name, uint flags, uint desiredAccess); 27internal static partial SafeWaitHandle OpenEvent(uint desiredAccess, [MarshalAs(UnmanagedType.Bool)] bool inheritHandle, string name);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Mutex.cs (3)
15internal static partial SafeWaitHandle OpenMutex(uint desiredAccess, [MarshalAs(UnmanagedType.Bool)] bool inheritHandle, string name); 18internal static partial SafeWaitHandle CreateMutexEx(IntPtr lpMutexAttributes, string? name, uint flags, uint desiredAccess); 22internal static partial bool ReleaseMutex(SafeWaitHandle handle);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Semaphore.cs (3)
13internal static partial SafeWaitHandle OpenSemaphore(uint desiredAccess, [MarshalAs(UnmanagedType.Bool)] bool inheritHandle, string name); 16internal static partial SafeWaitHandle CreateSemaphoreEx(IntPtr lpSecurityAttributes, int initialCount, int maximumCount, string? name, uint flags, uint desiredAccess); 20internal static partial bool ReleaseSemaphore(SafeWaitHandle handle, int releaseCount, out int previousCount);
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.Windows.cs (4)
20private EventWaitHandle(SafeWaitHandle handle) 32SafeWaitHandle handle = Interop.Kernel32.CreateEventEx(lpSecurityAttributes: 0, name: null, flags, AccessRights); 60SafeWaitHandle handle; 196internal static bool Set(SafeWaitHandle waitHandle)
src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (1)
93private Mutex(SafeWaitHandle handle)
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (3)
158private readonly SafeWaitHandle[] _waitHandles = new SafeWaitHandle[WaitHandle.MaxWaitHandles]; 244int signaledHandleIndex = WaitHandle.WaitAny(new ReadOnlySpan<SafeWaitHandle>(_waitHandles, 0, numUserWaits + 1), timeoutDurationMs);
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (2)
24private SafeWaitHandle? UserUnregisterWaitHandle { get; set; } 169SafeWaitHandle? handle = UserUnregisterWaitHandle;
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Unix.cs (3)
15private SafeWaitHandle? _waitHandle; 29/// The <see cref="SafeWaitHandle"/> that was registered. 31internal SafeWaitHandle Handle
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (3)
20private Semaphore(SafeWaitHandle handle) 29SafeWaitHandle handle = 64SafeWaitHandle myHandle;
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (18)
20private SafeWaitHandle? _waitHandle; 23private static SafeWaitHandle?[]? t_safeWaitHandlesForRent; 73public SafeWaitHandle SafeWaitHandle 117SafeWaitHandle? waitHandle = _waitHandle; 210private static SafeWaitHandle?[] RentSafeWaitHandleArray(int capacity) 212SafeWaitHandle?[]? safeWaitHandles = t_safeWaitHandlesForRent; 222safeWaitHandles = new SafeWaitHandle[Math.Max(capacity, 229private static void ReturnSafeWaitHandleArray(SafeWaitHandle?[]? safeWaitHandles) 239Span<SafeWaitHandle?> safeWaitHandles, 246SafeWaitHandle? lastSafeWaitHandle = null; 252SafeWaitHandle? safeWaitHandle = waitHandle._waitHandle; 266SafeWaitHandle? safeWaitHandle = safeWaitHandles[i]; 311SafeWaitHandle?[]? safeWaitHandles = RentSafeWaitHandleArray(waitHandles.Length); 349if (safeWaitHandles[i] is SafeWaitHandle swh) 360private static int WaitAnyMultiple(ReadOnlySpan<SafeWaitHandle> safeWaitHandles, int millisecondsTimeout) 459SafeWaitHandle? safeWaitHandleToSignal = toSignal._waitHandle; 460SafeWaitHandle? safeWaitHandleToWaitOn = toWaitOn._waitHandle; 520internal static int WaitAny(ReadOnlySpan<SafeWaitHandle> safeWaitHandles, int millisecondsTimeout) =>
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandleExtensions.cs (2)
15public static SafeWaitHandle GetSafeWaitHandle(this WaitHandle waitHandle) 27public static void SetSafeWaitHandle(this WaitHandle waitHandle, SafeWaitHandle? value)
src\System\Threading\LowLevelLifoSemaphore.Unix.cs (1)
35private static partial int WaitNative(SafeWaitHandle handle, int timeoutMs);
src\System\Threading\Mutex.CoreCLR.Unix.cs (9)
19SafeWaitHandle handle = 49SafeWaitHandle mutexHandle = 86SafeWaitHandle myHandle = OpenMutexCore(name, currentUserOnly, out int errorCode, out string? errorDetails); 127private static unsafe SafeWaitHandle CreateMutexCore( 135SafeWaitHandle mutexHandle = 146private static unsafe SafeWaitHandle OpenMutexCore(string name, bool currentUserOnly, out int errorCode, out string? errorDetails) 149SafeWaitHandle mutexHandle = OpenMutex(name, currentUserOnly, systemCallErrors, SystemCallErrorsBufferSize); 173private static unsafe partial SafeWaitHandle CreateMutex([MarshalAs(UnmanagedType.Bool)] bool initialOwner, string? name, [MarshalAs(UnmanagedType.Bool)] bool currentUserOnly, byte* systemCallErrors, uint systemCallErrorsBufferSize); 176private static unsafe partial SafeWaitHandle OpenMutex(string name, [MarshalAs(UnmanagedType.Bool)] bool currentUserOnly, byte* systemCallErrors, uint systemCallErrorsBufferSize);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeWaitHandle))]
System.Runtime.Handles (1)
System.Runtime.Handles.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeWaitHandle))]
UIAutomationClient (3)
MS\Internal\Automation\Misc.cs (2)
470internal static int TryMsgWaitForMultipleObjects(SafeWaitHandle handle, bool waitAll, int milliseconds, int wakeMask, ref int lastWin32Error) 499internal static int MsgWaitForMultipleObjects(SafeWaitHandle handle, bool waitAll, int milliseconds, int wakeMask)
MS\Internal\Automation\QueueProcessor.cs (1)
114SafeWaitHandle handle = _ev.SafeWaitHandle;
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\Misc.cs (1)
978internal static int MsgWaitForMultipleObjects(SafeWaitHandle handle, bool waitAll, int milliseconds, int wakeMask)
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
94SafeWaitHandle handle = _ev.SafeWaitHandle;