使用分布式锁解决并发问题
This commit is contained in:
1 parent
b9a6d002ca
commit
aeefff6c0b
11 files changed
+111
-22
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) HelloShop Corporation. All rights reserved.
|
||||
// See the license file in the project root for more information.
|
||||
|
||||
using Dapr.Client;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HelloShop.ServiceDefaults.DistributedLocks
|
||||
{
|
||||
#pragma warning disable CS0618
|
||||
public class DaprDistributedLockResult(TryLockResponse tryLockResponse) : IDistributedLockResult
|
||||
#pragma warning restore CS0618
|
||||
{
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
await tryLockResponse.DisposeAsync().ConfigureAwait(false);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user