Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需求:关于分布式锁的改进建议 #169

Open
hd2y opened this issue Dec 21, 2023 · 3 comments
Open

需求:关于分布式锁的改进建议 #169

hd2y opened this issue Dec 21, 2023 · 3 comments

Comments

@hd2y
Copy link

hd2y commented Dec 21, 2023

需求来自于微信群。

LockController ,我有两个提议,一个是支持 CancellationToken

另一个是增加 waitTimeoutSecond。

等待时间和刷新时间分开。

使用时,如果 waitTimeoutSecond 时间结束没有获取到锁,则失败返回。

而 timeoutSeconds 用于刷新时间 @whuanle

@2881099
Copy link
Owner

2881099 commented Dec 21, 2023

建议pr

@Naughtyhusky
Copy link

得嘞,我也遇见这个问题了,设置的锁自动过期时间是5分钟。然后程序在尝试获取锁的时候,就在那等了五分钟......

@whuanle
Copy link
Contributor

whuanle commented Jan 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants