SemaphoreSlim.WaitAsync before/after try block
According to MSDN, SemaphoreSlim.WaitAsync may throw: ObjectDisposedException – If the semaphore has been disposed ArgumentOutOfRangeException – if you choose the overload which accepts an int and it is a negative number (excluding -1) In both cases, the SemaphoreSlim wont acquire the lock, which makes it unnessacery to release it in a finally block. One thing … Read more