Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Jun 29, 2024
1 parent 4c9efe4 commit 0f5cff2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions AsyncKeyedLock/AsyncKeyedLocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,34 +1743,34 @@ public bool IsInUse(TKey key)
{
return false;
}
#if NET9_0_OR_GREATER
result.Lock.Enter();
#else
//#if NET9_0_OR_GREATER
// result.Lock.Enter();
//#else
Monitor.Enter(result);
#endif
//#endif
if (result.IsNotInUse)
{
#if NET9_0_OR_GREATER
result.Lock.Exit();
#else
//#if NET9_0_OR_GREATER
// result.Lock.Exit();
//#else
Monitor.Exit(result);
#endif
//#endif
return false;
}
if (_dictionary.PoolingEnabled && !result.Key.Equals(key))
{
#if NET9_0_OR_GREATER
result.Lock.Exit();
#else
//#if NET9_0_OR_GREATER
// result.Lock.Exit();
//#else
Monitor.Exit(result);
#endif
//#endif
return false;
}
#if NET9_0_OR_GREATER
result.Lock.Exit();
#else
//#if NET9_0_OR_GREATER
// result.Lock.Exit();
//#else
Monitor.Exit(result);
#endif
//#endif
return true;
}

Expand Down

0 comments on commit 0f5cff2

Please sign in to comment.