Click to See Complete Forum and Search --> : what the heck is reader lock? writer lock?


nfung
October 30th, 2002, 07:15 PM
I dont even see an explanation in MSDN documentation?

reader lock: read only, compatible with other reader lock request.
(ie. the requesting thread is just reading from it, the
reader lock does not block other threads from
reading from the resource.)

writer lock: exclusive access.
(the requesting thread secure an exclusive write
access to a particular section of code, no other thread
can read or write or access this code section)

is this correct? ****, i hate bad documentation. And just as with MSDN 6, they dont have a short sample at the end of a lot of API documentation.

Athley
October 31st, 2002, 01:31 AM
Correct.

Multiple threads can be reading at the sam time and a writing thread blocks all the other threads.

/Leyan