mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-14 04:05:04 +00:00
Don't throw an exception when attempting to leave an unentered critical section, for consistency with simplsharp
This commit is contained in:
@@ -20,7 +20,8 @@ namespace ICD.Common.Utils
|
||||
/// </summary>
|
||||
public void Leave()
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
if (Monitor.IsEntered(this))
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user