PluralKit/PluralKit.Core/Utils/DatabaseUtils.cs

20 lines
423 B
C#
Raw Normal View History

2020-06-13 21:12:44 +00:00
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);
}
}
}