PluralKit/PluralKit.Core/Database/Utils/DbConnectionCountHolder.cs
2021-08-27 11:03:47 -04:00

20 lines
420 B
C#

using System.Threading;
namespace PluralKit.Core
{
public class DbConnectionCountHolder
{
private int _connectionCount;
public int ConnectionCount => _connectionCount;
public void Increment()
{
Interlocked.Increment(ref _connectionCount);
}
public void Decrement()
{
Interlocked.Decrement(ref _connectionCount);
}
}
}