Esempio n. 1
0
 /// <summary>
 ///     Get a disposable token for guaranteed release via a using() statement.
 /// </summary>
 public static Task <SemaphoreSlimToken> WaitToken(this SemaphoreSlim semaphore)
 {
     return(SemaphoreSlimToken.WaitAsync(semaphore));
 }
Esempio n. 2
0
 /// <summary>
 ///     Get a disposable token for guaranteed release via a using() statement.
 /// </summary>
 public static SemaphoreSlimToken WaitToken(this SemaphoreSlim semaphore)
 {
     return(SemaphoreSlimToken.Wait(semaphore));
 }