jellyfin/Emby.Common.Implementations/IO/SharpCifs/Util/Sharpen/ReentrantLock.cs
2017-06-21 02:46:57 -04:00

23 lines
363 B
C#

using System.Threading;
namespace SharpCifs.Util.Sharpen
{
internal class ReentrantLock
{
public void Lock()
{
Monitor.Enter(this);
}
public bool TryLock()
{
return Monitor.TryEnter(this);
}
public void Unlock()
{
Monitor.Exit(this);
}
}
}