mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
682 B
17 lines
682 B
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Volo.Abp.DistributedLocking;
|
|
|
|
/// <summary>
|
|
/// This implementation of <see cref="IAbpDistributedLock"/> does not provide any distributed locking functionality.
|
|
/// Useful in scenarios where distributed locking is not required or during testing.
|
|
/// </summary>
|
|
public class NullAbpDistributedLock : IAbpDistributedLock
|
|
{
|
|
public Task<IAbpDistributedLockHandle?> TryAcquireAsync(string name, TimeSpan timeout = default, CancellationToken cancellationToken = default)
|
|
{
|
|
return Task.FromResult<IAbpDistributedLockHandle?>(new LocalAbpDistributedLockHandle(NullDisposable.Instance));
|
|
}
|
|
}
|
|
|