7 types derived from WaitHandle
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.ProcessWaitHandle.cs (1)
13internal sealed class ProcessWaitHandle : WaitHandle
System.Diagnostics.Process (1)
System\Diagnostics\ProcessWaitHandle.Unix.cs (1)
9internal sealed class ProcessWaitHandle : WaitHandle
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapAsyncResult.cs (1)
46private sealed class LdapAsyncWaitHandle : WaitHandle
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
80internal sealed class EventPipeWaitHandle : WaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (1)
11public partial class EventWaitHandle : WaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (1)
14public sealed partial class Mutex : WaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (1)
11public sealed partial class Semaphore : WaitHandle
242 references to WaitHandle
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AsyncResult.cs (1)
49public WaitHandle AsyncWaitHandle
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
210public static bool WaitOne(WaitHandle waitHandle, TimeSpan timeout)
Microsoft.AspNetCore.Server.HttpSys (3)
RequestProcessing\ClientCertLoader.cs (1)
331public WaitHandle AsyncWaitHandle
RequestProcessing\RequestStreamAsyncResult.cs (1)
162public WaitHandle AsyncWaitHandle
RequestProcessing\ResponseStreamAsyncResult.cs (1)
318public WaitHandle AsyncWaitHandle
Microsoft.Build (47)
BackEnd\BuildManager\BuildSubmission.cs (1)
265public new WaitHandle WaitHandle => base.WaitHandle;
BackEnd\BuildManager\BuildSubmissionBase.cs (2)
63/// A <see cref="System.Threading.WaitHandle"/> which will be signalled when the build is complete. Valid after <see cref="BuildSubmissionBase{TRequestData,TResultData}.Execute()"/> or <see cref="BuildSubmission.ExecuteAsync(BuildSubmissionCompleteCallback, object)"/> returns, otherwise null. 65public WaitHandle WaitHandle => CompletionEvent;
BackEnd\BuildManager\LegacyThreadingData.cs (1)
121internal WaitHandle GetStartRequestBuilderMainThreadEventForSubmission(int submissionId)
BackEnd\Client\MSBuildClient.cs (2)
402WaitHandle[] waitHandles = 411int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Client\MSBuildClientPacketPump.cs (2)
216WaitHandle[] handles = 229int waitId = WaitHandle.WaitAny(handles);
BackEnd\Components\Communications\NodeEndpointInProc.cs (2)
430WaitHandle[] handles = [_terminatePacketPump, _packetAvailable]; 435int waitId = WaitHandle.WaitAny(handles);
BackEnd\Components\Logging\LoggingService.cs (2)
1488WaitHandle[] waitHandlesForNextEvent = [completeAdding.WaitHandle, _enqueueEvent]; 1512WaitHandle.WaitAny(waitHandlesForNextEvent);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (12)
409WaitHandle[] handles = [_terminateEvent, _continueEvent]; 414handle = WaitHandle.WaitAny(handles); 455WaitHandle[] handles = [_terminateEvent, _continueEvent]; 457int handle = WaitHandle.WaitAny(handles); 513WaitHandle[] waitHandles = [_terminateEvent, responseEvent]; 520waitResult = WaitHandle.WaitAny(waitHandles); 585internal static int WaitWithBuilderThreadStart(WaitHandle[] handles, bool recursive, LegacyThreadingData threadingData, int submissionId) 587WaitHandle[] allHandles = new WaitHandle[handles.Length + 1]; 595int signaledIndex = WaitHandle.WaitAny(allHandles, Timeout.Infinite); 979WaitHandle[] handles = [_terminateEvent, _continueEvent]; 998handle = WaitHandle.WaitAny(handles);
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
134WaitHandle.WaitAny([_responseReceivedEvent, ShutdownEvent]);
BackEnd\Node\InProcNode.cs (2)
145WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 151int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Node\OutOfProcNode.cs (2)
258WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 263int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Node\OutOfProcServerNode.cs (2)
166WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 171int index = WaitHandle.WaitAny(waitHandles);
Graph\GraphBuildSubmission.cs (1)
94public new WaitHandle WaitHandle => base.WaitHandle;
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (3)
691WaitHandle[] handles = new WaitHandle[] 707int waitId = WaitHandle.WaitAny(handles);
Utilities\AwaitExtensions.cs (12)
52/// Provides await functionality for ordinary <see cref="WaitHandle"/>s. 56internal static TaskAwaiter GetAwaiter(this WaitHandle handle) 63/// Provides await functionality for an array of ordinary <see cref="WaitHandle"/>s. 67internal static TaskAwaiter<int> GetAwaiter(this WaitHandle[] handles) 74/// Creates a TPL Task that is marked as completed when a <see cref="WaitHandle"/> is signaled. 82internal static Task ToTask(this WaitHandle handle, int timeout = Timeout.Infinite) 84return ToTask(new WaitHandle[1] { handle }, timeout); 88/// Creates a TPL Task that is marked as completed when any <see cref="WaitHandle"/> in the array is signaled. 96internal static Task<int> ToTask(this WaitHandle[] handles, int timeout = Timeout.Infinite) 101int signalledHandle = WaitHandle.WaitAny(handles, 0); 102if (signalledHandle != WaitHandle.WaitTimeout) 123tcs.TrySetResult(WaitHandle.WaitTimeout);
Microsoft.Build.Utilities.Core (2)
ToolTask.cs (2)
942WaitHandle[] notifications = 971int notificationIndex = WaitHandle.WaitAny(notifications);
Microsoft.Maui.Resizetizer (3)
AsyncTask.cs (3)
274 WaitHandle[] handles = new WaitHandle[] { 286 var index = (WaitHandleIndex)System.Threading.WaitHandle.WaitAny(handles, TimeSpan.FromMilliseconds(10));
Microsoft.TestPlatform.CommunicationUtilities (3)
TestRequestSender.cs (3)
220var waitIndex = WaitHandle.WaitAny([_connected.WaitHandle, cancellationToken.WaitHandle, _clientExited.WaitHandle], connectionTimeout); 289var waitResult = WaitHandle.WaitAny([protocolNegotiated, _clientExited.WaitHandle], timeout * 1000); 306if (waitResult == WaitHandle.WaitTimeout)
Microsoft.VisualStudio.TestPlatform.Client (2)
DesignMode\DesignModeClient.cs (2)
322WaitHandle.WaitAny([waitHandle, cancellationToken.WaitHandle]); 375WaitHandle.WaitAny([waitHandle, cancellationToken.WaitHandle]);
MSBuild (5)
OutOfProcTaskHostNode.cs (2)
882WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent, _taskCompleteEvent, _taskCancelledEvent]; 886int index = WaitHandle.WaitAny(waitHandles);
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (3)
691WaitHandle[] handles = new WaitHandle[] 707int waitId = WaitHandle.WaitAny(handles);
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1188[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.WaitHandle))]
netstandard (1)
netstandard.cs (1)
2151[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.WaitHandle))]
PresentationCore (1)
MS\Internal\IO\Packaging\NetStream.cs (1)
1080int index = WaitHandle.WaitAny(_readEventHandles);
PresentationFramework (1)
System\Windows\Documents\PageContentAsyncResult.cs (1)
87public WaitHandle AsyncWaitHandle
System.Collections.Concurrent (11)
System\Collections\Concurrent\BlockingCollection.cs (11)
971List<WaitHandle> handles = GetHandles(collections, externalCancellationToken, true, out collatedCancellationTokens); 987index = WaitHandle.WaitAny(handles.ToArray(), timeout); 998Debug.Assert((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count)); 1000if (index == WaitHandle.WaitTimeout) //case#2 1048private static List<WaitHandle> GetHandles(BlockingCollection<T>[] collections, CancellationToken externalCancellationToken, bool isAddOperation, out CancellationToken[] cancellationTokens) 1051List<WaitHandle> handlesList = new List<WaitHandle>(collections.Length + 1); // + 1 for the external token handle to be added 1376List<WaitHandle> handles = GetHandles(collections, externalCancellationToken, false, out collatedCancellationTokens); 1388int index = WaitHandle.WaitAny(handles.ToArray(), timeout); 1397Debug.Assert((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count)); 1398if (index == WaitHandle.WaitTimeout) //case#2
System.Data.Odbc (9)
Common\System\Data\ProviderBase\DbConnectionPool.cs (9)
47private readonly WaitHandle[] _handlesWithCreate; 48private readonly WaitHandle[] _handlesWithoutCreate; 56_handlesWithCreate = new WaitHandle[] { _poolSemaphore, _errorEvent, _creationSemaphore }; 57_handlesWithoutCreate = new WaitHandle[] { _poolSemaphore, _errorEvent }; 76internal WaitHandle[] GetHandles(bool withCreate) 733waitResult = WaitHandle.WaitAny(_waitHandles.GetHandles(allowCreate), unchecked((int)waitForMultipleObjectsTimeout)); 744case WaitHandle.WaitTimeout: 963waitResult = WaitHandle.WaitAny(_waitHandles.GetHandles(withCreate: true), CreationTimeout); 990else if (WaitHandle.WaitTimeout == waitResult)
System.Diagnostics.Process (2)
System\Diagnostics\Process.cs (2)
67private WaitHandle? _waitHandle; 1583WaitHandle? wh = null;
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapAsyncResult.cs (1)
28WaitHandle IAsyncResult.AsyncWaitHandle => field ??= new LdapAsyncWaitHandle(_manualResetEvent.SafeWaitHandle);
System.Net.HttpListener (3)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
89public WaitHandle AsyncWaitHandle
System\Net\Managed\HttpStreamAsyncResult.cs (1)
84public WaitHandle AsyncWaitHandle
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
213public WaitHandle AsyncWaitHandle
System.Net.Requests (5)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
89public WaitHandle AsyncWaitHandle
System\Net\TimerThread.cs (4)
91private static readonly WaitHandle[] s_threadEvents = { s_threadShutdownEvent, s_threadReadyEvent }; 555int waitResult = WaitHandle.WaitAny(s_threadEvents, waitDuration, false); 565if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Awoke, cause {(waitResult == WaitHandle.WaitTimeout ? "Timeout" : "Prod")}"); 568if (waitResult == WaitHandle.WaitTimeout && !haveNextTick)
System.Private.CoreLib (127)
src\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (1)
155public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
src\runtime\src\libraries\System.Private.CoreLib\src\System\GC.cs (2)
17=> WaitForFullGCApproach(WaitHandle.ToTimeoutMilliseconds(timeout)); 26=> WaitForFullGCComplete(WaitHandle.ToTimeoutMilliseconds(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IAsyncResult.cs (1)
15WaitHandle AsyncWaitHandle { get; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
197protected virtual WaitHandle CreateWaitHandle() => new ManualResetEvent(false);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\AbandonedMutexException.cs (4)
35public AbandonedMutexException(int location, WaitHandle? handle) 42public AbandonedMutexException(string? message, int location, WaitHandle? handle) 49public AbandonedMutexException(string? message, Exception? inner, int location, WaitHandle? handle) 63private void SetupException(int location, WaitHandle? handle)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationToken.cs (3)
78/// Gets a <see cref="Threading.WaitHandle"/> that is signaled when the token is canceled.</summary> 80/// Accessing this property causes a <see cref="Threading.WaitHandle">WaitHandle</see> 87public WaitHandle WaitHandle => (_source ?? CancellationTokenSource.s_neverCanceledSource).WaitHandle;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
44/// <summary><see cref="Threading.WaitHandle"/> lazily initialized and returned from <see cref="WaitHandle"/>.</summary> 90internal WaitHandle WaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
272public bool TryEnter(TimeSpan timeout) => TryEnter_Outlined(WaitHandle.ToTimeoutMilliseconds(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (3)
68/// Gets the underlying <see cref="Threading.WaitHandle"/> object for this <see 71/// <value>The underlying <see cref="Threading.WaitHandle"/> event object for this <see 78public WaitHandle WaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Monitor.cs (4)
14=> TryEnter(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); 17=> TryEnter(obj, WaitHandle.ToTimeoutMilliseconds(timeout), ref lockTaken); 22public static bool Wait(object obj, TimeSpan timeout) => Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); 41=> Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedMutex.Unix.cs (3)
659MutexTryAcquireLockResult.AcquiredLock => WaitHandle.WaitSuccess, 660MutexTryAcquireLockResult.AcquiredLockButMutexWasAbandoned => WaitHandle.WaitAbandoned, 661MutexTryAcquireLockResult.TimedOut => WaitHandle.WaitTimeout,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (1)
510WaitHandle waitObject,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (13)
151private readonly RegisteredWaitHandle[] _registeredWaits = new RegisteredWaitHandle[WaitHandle.MaxWaitHandles - 1]; 158private readonly SafeWaitHandle[] _waitHandles = new SafeWaitHandle[WaitHandle.MaxWaitHandles]; 167private readonly RegisteredWaitHandle?[] _pendingRemoves = new RegisteredWaitHandle[WaitHandle.MaxWaitHandles - 1]; 244int signaledHandleIndex = WaitHandle.WaitAny(new ReadOnlySpan<SafeWaitHandle>(_waitHandles, 0, numUserWaits + 1), timeoutDurationMs); 246if (signaledHandleIndex >= WaitHandle.WaitAbandoned && 247signaledHandleIndex < WaitHandle.WaitAbandoned + 1 + numUserWaits) 250Debug.Assert(signaledHandleIndex != WaitHandle.WaitAbandoned); // the first wait handle is an event 251signaledHandleIndex += WaitHandle.WaitSuccess - WaitHandle.WaitAbandoned; 259if (signaledHandleIndex != WaitHandle.WaitTimeout) 398if (_numUserWaits == WaitHandle.MaxWaitHandles - 1) 422/// As per CoreCLR's behavior, if the user passes in an invalid <see cref="WaitHandle"/> 423/// into <see cref="RegisteredWaitHandle.Unregister(WaitHandle)"/>, then the unregistration of the wait handle is blocking.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (5)
12/// An object representing the registration of a <see cref="WaitHandle"/> via <see cref="ThreadPool.RegisterWaitForSingleObject"/>. 23/// The <see cref="WaitHandle"/> the user passed in via <see cref="Unregister(WaitHandle)"/>. 56internal RegisteredWaitHandle(WaitHandle waitHandle, _ThreadPoolWaitOrTimerCallback callbackHelper, 93private bool UnregisterPortableCore(WaitHandle waitObject)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Unix.cs (2)
11/// An object representing the registration of a <see cref="WaitHandle"/> via <see cref="ThreadPool.RegisterWaitForSingleObject"/>. 60public bool Unregister(WaitHandle waitObject) => UnregisterPortableCore(waitObject);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (4)
85/// Returns a <see cref="WaitHandle"/> that can be used to wait on the semaphore. 87/// <value>A <see cref="WaitHandle"/> that can be used to wait on the 97public WaitHandle AvailableWaitHandle 943WaitHandle? wh = m_waitHandle;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (1)
52return WaitHandle.WaitMultipleIgnoringSyncContext(waitHandles, waitAll, millisecondsTimeout);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
1560/// Gets a <see cref="WaitHandle"/> that can be used to wait for the task to 1571WaitHandle IAsyncResult.AsyncWaitHandle
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
561public bool Join(TimeSpan timeout) => Join(WaitHandle.ToTimeoutMilliseconds(timeout)); 563public static void Sleep(TimeSpan timeout) => Sleep(WaitHandle.ToTimeoutMilliseconds(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.Unix.cs (1)
68return WaitSubsystem.Wait(waitHandle.DangerousGetHandle(), millisecondsTimeout, interruptible: false) == WaitHandle.WaitSuccess;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
86WaitHandle waitObject,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
1388WaitHandle waitObject, 1408WaitHandle waitObject, 1427WaitHandle waitObject, 1442WaitHandle waitObject, 1460WaitHandle waitObject, 1479WaitHandle waitObject, 1498WaitHandle waitObject, 1519WaitHandle waitObject,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (6)
574public bool Dispose(WaitHandle toSignal) 612if (notifyWhenNoCallbacksRunning is WaitHandle) 693Debug.Assert(toSignal is WaitHandle || toSignal is Task); 695if (toSignal is WaitHandle wh) 799public bool Dispose(WaitHandle notifyObject) 949public bool Dispose(WaitHandle notifyObject)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (24)
239ReadOnlySpan<WaitHandle> waitHandles, 252WaitHandle waitHandle = waitHandles[i] ?? throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement); 291private static int WaitMultiple(WaitHandle[] waitHandles, bool waitAll, int millisecondsTimeout) 295return WaitMultiple(new ReadOnlySpan<WaitHandle>(waitHandles), waitAll, millisecondsTimeout); 298private static unsafe int WaitMultiple(ReadOnlySpan<WaitHandle> waitHandles, bool waitAll, int millisecondsTimeout) 449private static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, int millisecondsTimeout) 506public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout) => 508public static bool WaitAll(WaitHandle[] waitHandles, TimeSpan timeout) => 510public static bool WaitAll(WaitHandle[] waitHandles) => 512public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => 514public static bool WaitAll(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) => 517public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout) => 521internal static int WaitAny(ReadOnlySpan<WaitHandle> waitHandles, int millisecondsTimeout) => 523public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout) => 525public static int WaitAny(WaitHandle[] waitHandles) => 527public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => 529public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) => 532public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn) => 534public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, TimeSpan timeout, bool exitContext) => 536public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandleExtensions.cs (4)
13/// <param name="waitHandle">The <see cref="WaitHandle"/> to operate on.</param> 15public static SafeWaitHandle GetSafeWaitHandle(this WaitHandle waitHandle) 25/// <param name="waitHandle">The <see cref="WaitHandle"/> to operate on.</param> 27public static void SetSafeWaitHandle(this WaitHandle waitHandle, SafeWaitHandle? value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.HandleManager.Unix.cs (1)
61WaitHandle.ThrowInvalidHandleException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.ThreadWaitInfo.Unix.cs (10)
52/// storing <see cref="WaitableObject"/>s corresponding to <see cref="WaitHandle"/>s when the thread is not 148Math.Min(WaitHandle.MaxWaitHandles, 2 * currentLength))]; 162Math.Min(WaitHandle.MaxWaitHandles, 2 * currentLength))]; 250return WaitHandle.WaitTimeout; 265return WaitHandle.WaitAbandoned + waitedObjectIndexThatSatisfiedWait; 326Debug.Assert(waitResult != WaitHandle.WaitTimeout); 340if (waitResult != WaitHandle.WaitTimeout) 377return WaitHandle.WaitTimeout; 413Debug.Assert(waitResult == WaitHandle.WaitTimeout); 625Debug.Assert(waitedObjectIndex < WaitHandle.MaxWaitHandles);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.Unix.cs (2)
98/// <see cref="WaitHandle.MaxWaitHandles"/>, arrays necessary for holding information about a multi-wait, and list nodes 378Debug.Assert(waitHandles.Length <= WaitHandle.MaxWaitHandles);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.WaitableObject.Unix.cs (15)
321return isAbandoned ? WaitHandle.WaitAbandoned : WaitHandle.WaitSuccess; 332return WaitHandle.WaitSuccess; 337return WaitHandle.WaitTimeout; 392return WaitHandle.WaitAbandoned + i; 394return WaitHandle.WaitSuccess + i; 408return WaitHandle.WaitSuccess + i; 472return WaitHandle.WaitSuccess; 478return WaitHandle.WaitTimeout; 515Debug.Assert(signaledWaitedObjectIndex <= WaitHandle.MaxWaitHandles); 570Debug.Assert(signaledWaitedObjectIndex <= WaitHandle.MaxWaitHandles); 638WaitHandle.ThrowInvalidHandleException(); 700WaitHandle.ThrowInvalidHandleException(); 717WaitHandle.ThrowInvalidHandleException(); 758WaitHandle.ThrowInvalidHandleException();
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
862[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.WaitHandle))]
System.ServiceModel.Federation (1)
System\Runtime\OperationWithTimeoutAsyncResult.cs (1)
77public WaitHandle AsyncWaitHandle
System.ServiceModel.Primitives (3)
Internals\System\Runtime\AsyncResult.cs (1)
39public WaitHandle AsyncWaitHandle
Internals\System\Runtime\IOThreadTimer.cs (1)
652WaitHandle.WaitAny(waitableTimers, (int)waitDurationInMillis);
Internals\System\Runtime\TimeoutHelper.cs (1)
207public static bool WaitOne(WaitHandle waitHandle, TimeSpan timeout)
System.Threading (3)
System\Threading\CountdownEvent.cs (3)
108/// Gets a <see cref="System.Threading.WaitHandle"/> that is used to wait for the event to be set. 110/// <value>A <see cref="System.Threading.WaitHandle"/> that is used to wait for the event to be set.</value> 117public WaitHandle WaitHandle
System.Transactions.Local (1)
System\Transactions\CommittableTransaction.cs (1)
193WaitHandle IAsyncResult.AsyncWaitHandle
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (2)
3731private unsafe void WaitForWaitHandle(WaitHandle waitHandle) 6772using WaitHandle waitHandle = tme.AsyncWaitHandle;
System\Windows\Forms\Control.ThreadMethodEntry.cs (1)
49public WaitHandle AsyncWaitHandle
UnitTests.Common (1)
MockAsyncResult.cs (1)
28public WaitHandle AsyncWaitHandle { get; set; }