Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

ReaderWriterLock Class

Defines a lock that supports single writers and multiple readers

For a list of all members of this type, see ReaderWriterLock Members.



Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


ReaderWriterLock is used to synchronize access to a resource. At any given time, it allows either concurrent read access for multiple threads, or write access for a single thread. In a situation where a resource is changed infrequently, a ReaderWriterLock provides better throughput than a simple one-at-a-time lock, such as Monitor.

If a platform does not support a System.Threading.ReaderWriterLock implementation then all readers and writers are serialized. Therefore the caller must not rely on multiple simultaneous readers.


Namespace: log4net.Util

Assembly: log4net (in log4net.dll)

See Also

ReaderWriterLock Members | log4net.Util Namespace