示例#1
0
        public void Semaphore_Disposable()
        {
            var client = new Client();

            const string keyName = "test/semaphore/disposable";

            using (var semaphore = client.AcquireSemaphore(keyName, 2))
            {
                Assert.IsTrue(semaphore.IsHeld);
            }
        }
示例#2
0
        public void Semaphore_Disposable()
        {
            var client = new Client();

            const string keyName = "test/semaphore/disposable";
            using (var semaphore = client.AcquireSemaphore(keyName, 2))
            {
                Assert.IsTrue(semaphore.IsHeld);
            }
        }