Skip to content

Commit

Permalink
PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Sep 1, 2024
1 parent 6acde78 commit f38a82c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2030/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class Fixture
[Test]
public void GetTypeWithLenShouldBeThreadSafe()
{
Lock sync = new Lock();
object sync = new object();
List<Exception> exceptions = new List<Exception>();

ManualResetEvent startEvent = new ManualResetEvent(false);
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2192/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected override void OnTearDown()
[Test]
public void HqlIsThreadsafe_UsingThreads()
{
Lock sync = new Lock();
object sync = new object();
List<int> results = new List<int>();
List<Exception> exceptions = new List<Exception>();

Expand Down
10 changes: 5 additions & 5 deletions src/NHibernate/Cache/SyncCacheLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace NHibernate.Cache
{
class SyncCacheLock : ICacheLock
{
private readonly MonitorLock _monitorLock;
private readonly InternalLock _internalLock;

class MonitorLock : IDisposable
class InternalLock : IDisposable
{
private readonly Lock _lockObj = new Lock();

Expand All @@ -26,7 +26,7 @@ public void Dispose()

public SyncCacheLock()
{
_monitorLock = new();
_internalLock = new();
}

public void Dispose()
Expand All @@ -35,12 +35,12 @@ public void Dispose()

public IDisposable ReadLock()
{
return _monitorLock.Lock();
return _internalLock.Lock();
}

public IDisposable WriteLock()
{
return _monitorLock.Lock();
return _internalLock.Lock();
}

public Task<IDisposable> ReadLockAsync()
Expand Down

0 comments on commit f38a82c

Please sign in to comment.