public void WaitAndReleaseAll() { var semaphore = new AsyncSemaphore(10, 10); var acquire = semaphore.WaitAndReleaseAll(); Assert.Equal(0, semaphore.CurrentCount); acquire.Dispose(); Assert.Equal(10, semaphore.CurrentCount); }