Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 63f15b5

Browse files
committed
Use ReaderWriterLockSlim in System.Composition
1 parent 1f1d240 commit 63f15b5

File tree

1 file changed

+0
-35
lines changed
  • src/System.Composition.Convention/src/Microsoft/Internal

1 file changed

+0
-35
lines changed

src/System.Composition.Convention/src/Microsoft/Internal/Lock.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace Microsoft.Internal
1111
{
1212
internal sealed class Lock : IDisposable
1313
{
14-
#if FEATURE_SLIMLOCK
1514
private readonly ReaderWriterLockSlim _thisLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
1615
private int _isDisposed = 0;
1716
public void EnterReadLock()
@@ -41,39 +40,5 @@ public void Dispose()
4140
_thisLock.Dispose();
4241
}
4342
}
44-
45-
#else
46-
// ReaderWriterLockSlim is not yet implemented on SilverLight
47-
// Satisfies our requirements until it is implemented
48-
private readonly object _thisLock = new object();
49-
50-
public Lock()
51-
{
52-
}
53-
54-
public void EnterReadLock()
55-
{
56-
Monitor.Enter(_thisLock);
57-
}
58-
59-
public void EnterWriteLock()
60-
{
61-
Monitor.Enter(_thisLock);
62-
}
63-
64-
public void ExitReadLock()
65-
{
66-
Monitor.Exit(_thisLock);
67-
}
68-
69-
public void ExitWriteLock()
70-
{
71-
Monitor.Exit(_thisLock);
72-
}
73-
74-
public void Dispose()
75-
{
76-
}
77-
#endif //FEATURE_SLIMLOCK
7843
}
7944
}

0 commit comments

Comments
 (0)