예제 #1
0
        private async Task <_SemaphoreLock> Lock3Async()
        {
            var semaphore = new _SemaphoreLock(_semaphoreSlim);
            await semaphore.LockAsync(_timeout, _ct);

            return(semaphore);
        }
예제 #2
0
        private async Task <_SemaphoreLock> Lock1Async()
        {
            var semaphore = new _SemaphoreLock(_semaphoreSlim);
            await semaphore.LockAsync();

            return(semaphore);
        }