Library/Library.Test/LockingTests/TestReaderWriterLocking.cs
C# | Copy Code |
---|---|
using (ILockStrategy l = LockFactory.Create()) using (l.Read()) Assert.IsFalse(l.TryWrite(10)); |
VB.NET | Copy Code |
---|---|
Using l As ILockStrategy = LockFactory.Create() Using l.Read() Assert.IsFalse(l.TryWrite(10)) End Using End Using |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
ILockStrategy InterfaceILockStrategy Members
Overload List
ReadLock
Used By
ThreadedBTreeTest.TestCallLevelLocking()Boolean SynchronizedDictionary
Boolean SynchronizedDictionary
SynchronizedDictionary
Boolean SynchronizedList
Int32 SynchronizedList
SynchronizedList