Skip to content

Commit f38a82c

Browse files
PR changes
1 parent 6acde78 commit f38a82c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/NHibernate.Test/NHSpecificTest/NH2030/Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Fixture
1515
[Test]
1616
public void GetTypeWithLenShouldBeThreadSafe()
1717
{
18-
Lock sync = new Lock();
18+
object sync = new object();
1919
List<Exception> exceptions = new List<Exception>();
2020

2121
ManualResetEvent startEvent = new ManualResetEvent(false);

src/NHibernate.Test/NHSpecificTest/NH2192/Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected override void OnTearDown()
4545
[Test]
4646
public void HqlIsThreadsafe_UsingThreads()
4747
{
48-
Lock sync = new Lock();
48+
object sync = new object();
4949
List<int> results = new List<int>();
5050
List<Exception> exceptions = new List<Exception>();
5151

src/NHibernate/Cache/SyncCacheLock.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ namespace NHibernate.Cache
66
{
77
class SyncCacheLock : ICacheLock
88
{
9-
private readonly MonitorLock _monitorLock;
9+
private readonly InternalLock _internalLock;
1010

11-
class MonitorLock : IDisposable
11+
class InternalLock : IDisposable
1212
{
1313
private readonly Lock _lockObj = new Lock();
1414

@@ -26,7 +26,7 @@ public void Dispose()
2626

2727
public SyncCacheLock()
2828
{
29-
_monitorLock = new();
29+
_internalLock = new();
3030
}
3131

3232
public void Dispose()
@@ -35,12 +35,12 @@ public void Dispose()
3535

3636
public IDisposable ReadLock()
3737
{
38-
return _monitorLock.Lock();
38+
return _internalLock.Lock();
3939
}
4040

4141
public IDisposable WriteLock()
4242
{
43-
return _monitorLock.Lock();
43+
return _internalLock.Lock();
4444
}
4545

4646
public Task<IDisposable> ReadLockAsync()

0 commit comments

Comments
 (0)