Meaning of 'dolock'

Oct 12, 2009 at 6:54 PM

In your lite branch, you have this code in the handler resolution of HttpListener:


bool doLock = !rwHandlersLock.IsReadLockHeld;
            if (doLock) rwHandlersLock.EnterReadLock();


I'm having trouble following the intention. Doesn't skipping the lock if one is taken bypass the purpose of taking a lock in the first place?

Nov 1, 2009 at 10:17 AM

jhurliman is the developer of the light branch.