CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Location
    Toronto
    Posts
    309

    what the heck is reader lock? writer lock?

    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.

  2. #2
    Join Date
    Oct 2002
    Location
    Växjö, Sweden
    Posts
    225
    Correct.

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

    /Leyan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured