Exemple #1
0
        public async Task Semaphore_ExecuteAction()
        {
            var client = new ConsulClient();

            const string keyName = "test/semaphore/action";
            await client.ExecuteInSemaphore(keyName, 2, () => Assert.True(true));
        }
Exemple #2
0
        public async Task Semaphore_ExecuteAction()
        {
            const string keyName        = "test/semaphore/action";
            var          actionExecuted = false;

            await _client.ExecuteInSemaphore(keyName, 2, () => actionExecuted = true);

            Assert.True(actionExecuted);
        }
        public void Semaphore_ExecuteAction()
        {
            var client = new ConsulClient();

            const string keyName = "test/semaphore/action";
            client.ExecuteInSemaphore(keyName, 2, () => Assert.True(true));
        }