|
WaitHandleExtensionsWaitAll(IEnumerableManualResetEventSlim, CancellationToken) Method
|
Waits for all the specified ManualResetEventSlim elements to receive a signal.
Namespace: GSF.ThreadingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.248-beta+a497a19de709fd99e2448886199a2c8824265ddf
Syntaxpublic static bool WaitAll(
this IEnumerable<ManualResetEventSlim> resetEvents,
CancellationToken cancellationToken
)
<ExtensionAttribute>
Public Shared Function WaitAll (
resetEvents As IEnumerable(Of ManualResetEventSlim),
cancellationToken As CancellationToken
) As Boolean
public:
[ExtensionAttribute]
static bool WaitAll(
IEnumerable<ManualResetEventSlim^>^ resetEvents,
CancellationToken cancellationToken
)
[<ExtensionAttribute>]
static member WaitAll :
resetEvents : IEnumerable<ManualResetEventSlim> *
cancellationToken : CancellationToken -> bool
GSF.Threading.WaitHandleExtensions.WaitAll = function(resetEvents, cancellationToken);
View SourceParameters
- resetEvents IEnumerableManualResetEventSlim
- Collection of ManualResetEventSlim elements to operate on.
- cancellationToken CancellationToken
- A CancellationToken to observe.
Return Value
Booleantrue when every
ManualResetEventSlim element has received a signal; otherwise the method never returns unless cancelled.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableManualResetEventSlim. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
ExceptionsException | Condition |
---|
ArgumentNullException | resetEvents is null. |
Remarks
Using WaitAll(WaitHandle) will cause all ManualResetEventSlim elements
to be upgraded to a standard ManualResetEvent, these overloads allow similar functionality without
incurring unconditional inflation of the underlying ManualResetEvent.
See Also