See:
http://msdn.microsoft.com/library/de...LockTopic1.asp
You can call AcquireReaderLock multiple times aka "recursively" ergo you
need to call ReleaseReaderLock the same number of times, the same with
WriterLock.
Each time you call AcquireReaderLock the lock count is incremented by one,
each time you call ReleaseReaderLock the lock counted is decremented by one.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Lore Leunoeg" <lo*********@gmx.net> wrote in message
news:dm**********@news01.versatel.de...
| Thank you for the links. But -mmh - what exactly means "recursive lock
| count"? Why "recursive"? And is the lock count the ReleaseReaderLock
| decrements also recursive?
|
| Thank you again
| Sincerely
| Lore
|
| "m.posseth" <mi*****@nohausystems.nl> schrieb im Newsbeitrag
| news:OA**************@TK2MSFTNGP11.phx.gbl...
| > Hello Lore ,
| >
| > see
| >
| > ReleaseLock
| >
|
http://msdn.microsoft.com/library/de...elocktopic.asp
| >
| > ReleaseReaderLock
| >
|
http://msdn.microsoft.com/library/de...rlocktopic.asp
| >
| >
| >
| > in short the ReleaseLock releases the reader lock or writer lock,
| regardless
| > of the recursive lock count.
| > and the ReleaseReaderLock decrements the lock count. When the count
| reaches
| > zero, the lock is released. if there is no lock an error is raised
| >
| >
| > so yes there is a difference
| >
| > hth
| >
| > Michel Posseth [MCP]
| >
| >
| > "Lore Leunoeg" <lo*********@gmx.net> wrote in message
| > news:dm**********@news01.versatel.de...
| > > Is there any difference between:
| > > - ReleaseLock and RestoreLock and
| > > - simply releasing the Lock with ReleaseReaderLock or
| ReleaseWriterLockand
| > > acquire the lock again with AcquireReaderLock or AcquireWriterLock?
| > >
| > > Thank you
| > > Sincerely
| > > Lore
| > >
| > >
| >
| >
|
|