Lock for Async Methods

Despite the intended nature, we seldom might come across situation where we would want to place a lock around an async statement and make it behave differently, especially when accessed from different threads. Let's try to mock the scenario first to demonstrate the issue. The lock-async Problem Consider the following code snippet. The output of … Continue reading Lock for Async Methods