Microsoft KB Archive/821615

= ReaderWriterLock.AcquireReaderLock method documentation is missing information about possible exceptions =

Article ID: 821615

Article Last Modified on 6/1/2007

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition
 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.0

-



SUMMARY
The documentation about the ReaderWriterLock.AcquireReaderLock method does not discuss the possible exceptions that you may notice when a thread calls the AcquireReaderLock method. For example, you may receive the following exception error message when a thread calls the AcquireReaderLock method:

OutOfMemoryException



MORE INFORMATION
You can use the ReaderWriterLock class to synchronize access to a resource that is shared among multiple threads. The ReaderWriterLock class allows either concurrent read access for multiple threads or write access for a single thread.

The AcquireReaderLock method of the ReaderWriterLock class acquires read access to a resource for a thread that calls the method. However, if the thread that calls the AcquireReaderLock method is terminated while waiting in the method, you receive the &quot;out of memory&quot; error message.

