private _Semaphore _Lock4() { var semaphore = new _Semaphore(semaphoreSlim); semaphore.Lock(cancellationToken); return(semaphore); }
private _Semaphore _Lock2() { var semaphore = new _Semaphore(semaphoreSlim); semaphore.Lock(millisecondsTimeout); return(semaphore); }
private _Semaphore _Lock3() { var semaphore = new _Semaphore(semaphoreSlim); semaphore.Lock(timeout); return(semaphore); }
private _Semaphore _Lock1() { var semaphore = new _Semaphore(semaphoreSlim); semaphore.Lock(); return(semaphore); }
private async Task <_Semaphore> _Lock6Async() { var semaphore = new _Semaphore(semaphoreSlim); await semaphore.LockAsync(timeout, cancellationToken); return(semaphore); }
private async Task <_Semaphore> _Lock3Async() { var semaphore = new _Semaphore(semaphoreSlim); await semaphore.LockAsync(timeout); return(semaphore); }
private async Task <_Semaphore> _Lock2Async() { var semaphore = new _Semaphore(semaphoreSlim); await semaphore.LockAsync(millisecondsTimeout); return(semaphore); }
private _Semaphore _Lock5() { var semaphore = new _Semaphore(semaphoreSlim); semaphore.Lock(millisecondsTimeout, cancellationToken); return(semaphore); }