I just read an article that describes how HttpApplicationState has AcquireRead() / AcquireWrite()
functions to manage concurrent access. It continues to explain, that in some conditions however we need to use an explict Lock()
and Unlock()
on the Application object to avoid a Race condition.
I am unable to understand why a race condition should exist for Application state if concurrent access is implicitly handled by the object.
Could someone please explain this to me ? Why would I ever need to use Application.Lock()
and Application.Unlock()
? Thank You !