@@ -25,6 +25,8 @@ public class AsyncLock
2525 /// </param>
2626 /// <param name="cancellation">The CancellationToken token to observe.</param>
2727 /// <returns>A task that returns <see cref="IDisposable"/> to release the lock.</returns>
28+ /// <exception cref="OperationCanceledException">The token has had cancellation requested.</exception>
29+ /// <exception cref="TimeoutException">The timeout has expired.</exception>
2830 [ NotNull , ItemNotNull ]
2931 public async Task < IDisposable > AcquireAsync ( TimeSpan timeout , CancellationToken cancellation )
3032 {
@@ -46,6 +48,8 @@ public async Task<IDisposable> AcquireAsync(TimeSpan timeout, CancellationToken
4648 /// </param>
4749 /// <param name="cancellation">The CancellationToken token to observe.</param>
4850 /// <returns>A task that returns <see cref="IDisposable"/> to release the lock.</returns>
51+ /// <exception cref="OperationCanceledException">The token has had cancellation requested.</exception>
52+ /// <exception cref="TimeoutException">The timeout has expired.</exception>
4953 [ NotNull , ItemNotNull ]
5054 public Task < IDisposable > AcquireAsync ( int timeout , CancellationToken cancellation ) =>
5155 AcquireAsync ( TimeSpan . FromMilliseconds ( timeout ) , cancellation ) ;
@@ -58,6 +62,7 @@ public Task<IDisposable> AcquireAsync(int timeout, CancellationToken cancellatio
5862 /// indefinitely, or a 0 to return immediately.
5963 /// </param>
6064 /// <returns>A task that returns <see cref="IDisposable"/> to release the lock.</returns>
65+ /// <exception cref="TimeoutException">The timeout has expired.</exception>
6166 [ NotNull , ItemNotNull ]
6267 public Task < IDisposable > AcquireAsync ( int timeout ) => AcquireAsync ( TimeSpan . FromMilliseconds ( timeout ) , CancellationToken . None ) ;
6368
@@ -70,6 +75,7 @@ public Task<IDisposable> AcquireAsync(int timeout, CancellationToken cancellatio
7075 /// to return immediately.
7176 /// </param>
7277 /// <returns>A task that returns <see cref="IDisposable"/> to release the lock.</returns>
78+ /// <exception cref="TimeoutException">The timeout has expired.</exception>
7379 [ NotNull , ItemNotNull ]
7480 public Task < IDisposable > AcquireAsync ( TimeSpan timeout ) => AcquireAsync ( timeout , CancellationToken . None ) ;
7581
@@ -78,6 +84,7 @@ public Task<IDisposable> AcquireAsync(int timeout, CancellationToken cancellatio
7884 /// </summary>
7985 /// <param name="cancellation">The CancellationToken token to observe.</param>
8086 /// <returns>A task that returns <see cref="IDisposable"/> to release the lock.</returns>
87+ /// <exception cref="OperationCanceledException">The token has had cancellation requested.</exception>
8188 [ NotNull , ItemNotNull ]
8289 public Task < IDisposable > AcquireAsync ( CancellationToken cancellation ) => AcquireAsync ( - 1 , cancellation ) ;
8390
0 commit comments