Parameters
- syncRoot
Library/Library.Test/LockingTests/TestSimpleReadWriteLocking.cs
C# | Copy Code |
---|---|
Object obj = new object(); ILockStrategy l = new SimpleReadWriteLocking(obj); using(new ThreadedWriter(l)) Assert.IsFalse(Monitor.TryEnter(obj, 0)); l.Dispose(); |
VB.NET | Copy Code |
---|---|
Dim obj As [Object] = New Object() Dim l As ILockStrategy = New SimpleReadWriteLocking(obj) Using New ThreadedWriter(l) Assert.IsFalse(Monitor.TryEnter(obj, 0)) End Using l.Dispose() |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7