BotSharp/src/Infrastructure/BotSharp.Abstraction/Infrastructures/IDistributedLocker.cs
2024-12-03 16:52:14 -06:00

8 lines
234 B
C#

namespace BotSharp.Abstraction.Infrastructures;
public interface IDistributedLocker
{
bool Lock(string resource, Action action, int timeout = 30);
Task<bool> LockAsync(string resource, Func<Task> action, int timeout = 30);
}