예제 #1
0
 public AsyncLock()
 {
     _threadId = Environment.CurrentManagedThreadId;
     _semaphore = new AsyncSemaphore( 1 );
     _releaser = Task.FromResult( new Releaser( this ) );
     _reentrantReleaser = Task.FromResult( new Releaser() );
 }
예제 #2
0
 public AsyncLock()
 {
     _semaphore = new AsyncSemaphore(1);
     _releaser  = TaskEx.FromResult(new Releaser(this));
 }