使用分布式锁解决并发问题

This commit is contained in:
administrator committed 2024-11-19 21:19:18 +08:00
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);
}
}
}