kpreisser / AsyncReaderWriterLockSlim

An async-ready alternative to .NET's ReaderWriterLockSlim.
MIT License
24 stars 7 forks source link

Why are you calling Semaphore.Wait instead of Semaphore.WaitAsync? #3

Closed DonaldAirey closed 5 years ago

DonaldAirey commented 5 years ago

Looking at functions like TryEnterReadLock, you have the statement:

            try
            {
                waitResult = await .WaitingReadLocksSemaphore.Wait(millisecondsTimeout);
            }
            finally
            {
                this.EnterReadLockPostface(writeLockState, waitResult);
            }

Why are you using the Wait method instead of the WaitAsync method?

DonaldAirey commented 5 years ago

Never mind, I'm an idiot.