BotSharp/src/Infrastructure/BotSharp.Abstraction/Infrastructures/IDistributedLocker.cs

8 lines
234 B
C#
Raw Normal View History

2024-12-03 22:52:14 +00:00
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);
}