chore: Moved threading classes into Threading subdirectory

This commit is contained in:
Chris Cameron
2022-02-02 13:49:03 -05:00
parent 0c3c87308c
commit e5b10a96f7
9 changed files with 8 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
#if !SIMPLSHARP
using System.Threading;
namespace ICD.Common.Utils
{
public sealed partial class SafeCriticalSection
{
#region Methods
/// <summary>
/// Block until ownership of the critical section can be obtained.
/// </summary>
public void Enter()
{
Monitor.Enter(this);
}
/// <summary>
/// Release ownership of the critical section.
/// </summary>
public void Leave()
{
if (Monitor.IsEntered(this))
Monitor.Exit(this);
}
#endregion
}
}
#endif