AsyncLock(bool isLocked) { m_semaphore = new SemaphoreSlim(isLocked ? 0 : 1, 1); m_releaser = Task.FromResult((IDisposable)new Releaser(this)); }