Beispiel #1
0
 public AsyncLock(string key)
 {
     m_semaphore = new AsyncSemaphore(1);
     m_releaser  = Task.FromResult(new Releaser(this, () => _lockMap.TryRemove(key, out var _)));
     m_key       = key;
 }
Beispiel #2
0
 public AsyncLock()
 {
     m_semaphore = new AsyncSemaphore(1);
     m_releaser  = Task.FromResult(new Releaser(this));
 }
Beispiel #3
0
 public AsyncLock()
 {
     m_semaphore = new AsyncSemaphore(1);
     m_releaser = Task.FromResult(new Releaser(this));
 }