Skip to content

Commit 63df413

Browse files
committed
Add summary to WaitAsync
1 parent f8e0da1 commit 63df413

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,21 @@ public Task<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellat
658658
return WaitAsync(millisecondsTimeout == Timeout.Infinite ? Timeout.UnsignedInfinite : (uint)millisecondsTimeout, cancellationToken);
659659
}
660660

661+
/// <summary>
662+
/// Asynchronously waits to enter the <see cref="SemaphoreSlim"/>,
663+
/// using a 32-bit unsigned integer to measure the time interval,
664+
/// while observing a <see cref="CancellationToken"/>.
665+
/// </summary>
666+
/// <param name="millisecondsTimeout">
667+
/// The number of milliseconds to wait, or <see cref="Timeout.UnsignedInfinite"/> to wait indefinitely.
668+
/// </param>
669+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to observe.</param>
670+
/// <returns>
671+
/// A task that will complete with a result of true if the current thread successfully entered
672+
/// the <see cref="SemaphoreSlim"/>, otherwise with a result of false.
673+
/// </returns>
674+
/// <exception cref="ObjectDisposedException">The current instance has already been
675+
/// disposed.</exception>
661676
private Task<bool> WaitAsync(uint millisecondsTimeout, CancellationToken cancellationToken)
662677
{
663678
CheckDispose();

0 commit comments

Comments
 (0)