6 types derived from WaitHandle
System.Diagnostics.Process (1)
System\Diagnostics\ProcessWaitHandle.Unix.cs (1)
9internal sealed class ProcessWaitHandle : WaitHandle
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
80internal sealed class EventPipeWaitHandle : WaitHandle
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (1)
11public partial class EventWaitHandle : WaitHandle
src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (1)
14public sealed partial class Mutex : WaitHandle
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (1)
11public sealed partial class Semaphore : WaitHandle
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
15public sealed partial class Mutex : WaitHandle
253 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)
Extensibility.MessageInterceptor.IntegrationTests (2)
AsyncResult.cs (1)
40public WaitHandle AsyncWaitHandle
TimeoutHelper.cs (1)
127public static bool WaitOne(WaitHandle waitHandle, TimeSpan timeout, bool exitSync)
http2cat (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IIS.FunctionalTests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IIS.LongTests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IIS.NewHandler.FunctionalTests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IIS.NewShim.FunctionalTests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IIS.ShadowCopy.Tests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
IISExpress.FunctionalTests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.HttpLogging (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.OutputCaching (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.ResponseCaching (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.ResponseCompression (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.Server.HttpSys (5)
RequestProcessing\ClientCertLoader.cs (1)
331public WaitHandle AsyncWaitHandle
RequestProcessing\RequestStreamAsyncResult.cs (1)
162public WaitHandle AsyncWaitHandle
RequestProcessing\ResponseStreamAsyncResult.cs (1)
318public WaitHandle AsyncWaitHandle
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.Server.Kestrel.Core (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\TaskToApm.cs (2)
116/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary> 117public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
Microsoft.Build (46)
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);
BackEnd\BuildManager\BuildSubmission.cs (1)
263public new WaitHandle WaitHandle => base.WaitHandle;
BackEnd\BuildManager\BuildSubmissionBase.cs (2)
68/// 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. 70public WaitHandle WaitHandle => CompletionEvent;
BackEnd\BuildManager\LegacyThreadingData.cs (1)
121internal WaitHandle GetStartRequestBuilderMainThreadEventForSubmission(int submissionId)
BackEnd\Client\MSBuildClient.cs (2)
330WaitHandle[] waitHandles = 339int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Client\MSBuildClientPacketPump.cs (2)
208WaitHandle[] handles = 217int waitId = WaitHandle.WaitAny(handles);
BackEnd\Components\Communications\NodeEndpointInProc.cs (2)
423WaitHandle[] handles = [_terminatePacketPump, _packetAvailable]; 428int waitId = WaitHandle.WaitAny(handles);
BackEnd\Components\Logging\LoggingService.cs (2)
1411WaitHandle[] waitHandlesForNextEvent = { completeAdding.WaitHandle, _enqueueEvent }; 1427WaitHandle.WaitAny(waitHandlesForNextEvent);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (12)
405WaitHandle[] handles = [_terminateEvent, _continueEvent]; 410handle = WaitHandle.WaitAny(handles); 451WaitHandle[] handles = [_terminateEvent, _continueEvent]; 453int handle = WaitHandle.WaitAny(handles); 509WaitHandle[] waitHandles = [_terminateEvent, responseEvent]; 516waitResult = WaitHandle.WaitAny(waitHandles); 581internal static int WaitWithBuilderThreadStart(WaitHandle[] handles, bool recursive, LegacyThreadingData threadingData, int submissionId) 583WaitHandle[] allHandles = new WaitHandle[handles.Length + 1]; 591int signaledIndex = WaitHandle.WaitAny(allHandles, Timeout.Infinite); 960WaitHandle[] handles = [_terminateEvent, _continueEvent]; 979handle = WaitHandle.WaitAny(handles);
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
129WaitHandle.WaitAny([_responseReceivedEvent, ShutdownEvent]);
BackEnd\Node\InProcNode.cs (2)
140WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 146int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Node\OutOfProcNode.cs (2)
253WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 258int index = WaitHandle.WaitAny(waitHandles);
BackEnd\Node\OutOfProcServerNode.cs (2)
142WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent]; 147int index = WaitHandle.WaitAny(waitHandles);
Graph\GraphBuildSubmission.cs (1)
96public new WaitHandle WaitHandle => base.WaitHandle;
NodeEndpointOutOfProcBase.cs (2)
534WaitHandle[] handles = 544int waitId = WaitHandle.WaitAny(handles);
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BuildRequestEngine_Tests.cs (8)
124WaitHandle[] handles = new WaitHandle[2] { _cancelEvent, _continueEvent }; 125int evt = WaitHandle.WaitAny(handles, 5000); 532private void WaitForEvent(WaitHandle evt, string eventName) 534WaitHandle[] events = new WaitHandle[2] { _engineExceptionEvent, evt }; 535int index = WaitHandle.WaitAny(events, 5000); 536if (WaitHandle.WaitTimeout == index)
BackEnd\NodeEndpointInProc_Tests.cs (1)
120public WaitHandle DataReceivedEvent
BackEnd\RequestBuilder_Tests.cs (1)
326private void WaitForEvent(WaitHandle evt, string eventName)
Microsoft.Build.Utilities.Core (2)
ToolTask.cs (2)
889WaitHandle[] notifications = 918int 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));
MSBuild (4)
NodeEndpointOutOfProcBase.cs (2)
534WaitHandle[] handles = 544int waitId = WaitHandle.WaitAny(handles);
OutOfProcTaskHostNode.cs (2)
647WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent, _taskCompleteEvent, _taskCancelledEvent]; 651int index = WaitHandle.WaitAny(waitHandles);
MSBuildTaskHost (4)
NodeEndpointOutOfProcBase.cs (2)
534WaitHandle[] handles = 544int waitId = WaitHandle.WaitAny(handles);
OutOfProcTaskHostNode.cs (2)
647WaitHandle[] waitHandles = [_shutdownEvent, _packetReceivedEvent, _taskCompleteEvent, _taskCancelledEvent]; 651int index = WaitHandle.WaitAny(waitHandles);
mscorlib (1)
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)
1087int index = WaitHandle.WaitAny(_readEventHandles);
PresentationFramework (1)
System\Windows\Documents\PageContentAsyncResult.cs (1)
88public 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 1375List<WaitHandle> handles = GetHandles(collections, externalCancellationToken, false, out collatedCancellationTokens); 1387int index = WaitHandle.WaitAny(handles.ToArray(), timeout); 1396Debug.Assert((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count)); 1397if (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)
65private WaitHandle? _waitHandle; 1366WaitHandle? wh = null;
System.Net.HttpListener (3)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
104public WaitHandle AsyncWaitHandle
System\Net\Managed\HttpStreamAsyncResult.cs (1)
84public WaitHandle AsyncWaitHandle
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
212public WaitHandle AsyncWaitHandle
System.Net.Mail (1)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
104public WaitHandle AsyncWaitHandle
System.Net.Requests (5)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
104public 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 (98)
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (1)
172public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
src\libraries\System.Private.CoreLib\src\System\GC.cs (2)
17=> WaitForFullGCApproach(WaitHandle.ToTimeoutMilliseconds(timeout)); 26=> WaitForFullGCComplete(WaitHandle.ToTimeoutMilliseconds(timeout));
src\libraries\System.Private.CoreLib\src\System\IAsyncResult.cs (1)
15WaitHandle AsyncWaitHandle { get; }
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
197protected virtual WaitHandle CreateWaitHandle() => new ManualResetEvent(false);
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\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\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\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
226public bool TryEnter(TimeSpan timeout) => TryEnter_Outlined(WaitHandle.ToTimeoutMilliseconds(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (3)
67/// Gets the underlying <see cref="Threading.WaitHandle"/> object for this <see 70/// <value>The underlying <see cref="Threading.WaitHandle"/> event object fore this <see 77public WaitHandle WaitHandle
src\libraries\System.Private.CoreLib\src\System\Threading\Monitor.cs (4)
11=> TryEnter(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); 14=> TryEnter(obj, WaitHandle.ToTimeoutMilliseconds(timeout), ref lockTaken); 19public static bool Wait(object obj, TimeSpan timeout) => Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); 38=> Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (1)
483WaitHandle waitObject,
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\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (5)
11/// An object representing the registration of a <see cref="WaitHandle"/> via <see cref="ThreadPool.RegisterWaitForSingleObject"/>. 22/// The <see cref="WaitHandle"/> the user passed in via <see cref="Unregister(WaitHandle)"/>. 55internal RegisteredWaitHandle(WaitHandle waitHandle, _ThreadPoolWaitOrTimerCallback callbackHelper, 95private bool UnregisterPortableCore(WaitHandle waitObject)
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\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 893WaitHandle? wh = m_waitHandle;
src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (1)
52return WaitHandle.WaitMultipleIgnoringSyncContext(waitHandles, waitAll, millisecondsTimeout);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
1413/// Gets a <see cref="WaitHandle"/> that can be used to wait for the task to 1424WaitHandle IAsyncResult.AsyncWaitHandle
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
541public bool Join(TimeSpan timeout) => Join(WaitHandle.ToTimeoutMilliseconds(timeout)); 543public static void Sleep(TimeSpan timeout) => Sleep(WaitHandle.ToTimeoutMilliseconds(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
81WaitHandle waitObject,
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
1652WaitHandle waitObject, 1672WaitHandle waitObject, 1691WaitHandle waitObject, 1706WaitHandle waitObject, 1724WaitHandle waitObject, 1743WaitHandle waitObject, 1762WaitHandle waitObject, 1784WaitHandle waitObject,
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (6)
583public bool Dispose(WaitHandle toSignal) 621if (notifyWhenNoCallbacksRunning is WaitHandle) 702Debug.Assert(toSignal is WaitHandle || toSignal is Task); 704if (toSignal is WaitHandle wh) 808public bool Dispose(WaitHandle notifyObject) 958public bool Dispose(WaitHandle notifyObject)
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (24)
238ReadOnlySpan<WaitHandle> waitHandles, 251WaitHandle waitHandle = waitHandles[i] ?? throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement); 290private static int WaitMultiple(WaitHandle[] waitHandles, bool waitAll, int millisecondsTimeout) 294return WaitMultiple(new ReadOnlySpan<WaitHandle>(waitHandles), waitAll, millisecondsTimeout); 297private static int WaitMultiple(ReadOnlySpan<WaitHandle> waitHandles, bool waitAll, int millisecondsTimeout) 450private static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, int millisecondsTimeout) 507public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout) => 509public static bool WaitAll(WaitHandle[] waitHandles, TimeSpan timeout) => 511public static bool WaitAll(WaitHandle[] waitHandles) => 513public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => 515public static bool WaitAll(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) => 518public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout) => 522internal static int WaitAny(ReadOnlySpan<WaitHandle> waitHandles, int millisecondsTimeout) => 524public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout) => 526public static int WaitAny(WaitHandle[] waitHandles) => 528public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => 530public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) => 533public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn) => 535public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, TimeSpan timeout, bool exitContext) => 537public static bool SignalAndWait(WaitHandle toSignal, WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) =>
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\System\Threading\LowLevelLifoSemaphore.Unix.cs (3)
30Debug.Assert(waitResult == WaitHandle.WaitSuccess || waitResult == WaitHandle.WaitTimeout); 31return waitResult == WaitHandle.WaitSuccess;
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
818[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.WaitHandle))]
System.ServiceModel.Federation (1)
System\Runtime\OperationWithTimeoutAsyncResult.cs (1)
77public WaitHandle AsyncWaitHandle
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)
3463private unsafe void WaitForWaitHandle(WaitHandle waitHandle) 6457using 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; }
VBCSCompiler.UnitTests (2)
Extensions.cs (2)
19public static Task ToTask(this WaitHandle handle, int? timeoutMilliseconds) 39public static async Task WaitOneAsync(this WaitHandle handle, int? timeoutMilliseconds = null) => await handle.ToTask(timeoutMilliseconds);