public void ReleaseAll() { var semaphore = new AsyncSemaphore(0, 10, true); var acquiredWhenNoneAvailable = semaphore.Wait(10, 0); semaphore.ReleaseAll(); var acquiredWhenAllAvailable = semaphore.Wait(10, 0); Assert.False(acquiredWhenNoneAvailable); Assert.True(acquiredWhenAllAvailable); }