mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-20 04:18:51 -07:00
23 lines
363 B
C#
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);
|
|
}
|
|
}
|
|
}
|