-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
关于优化Lock::lock的建议 #516
Labels
Comments
第一种修改会破坏兼容性,造成BC,可以考虑在 3.0 里实现。 第二种修改逻辑和参数名含义冲突,不规范,不考虑采纳。 2.1 里可以做的修改就是给 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前Lock::lock的第一个参数ID 是给予static::getInstance的lockConfigId
这样的操作有一定误导性。
在实际业务中,可能为存在很多动态的lockId,不可能为大量动态的lockId来写对应的Lock实现类。
因此提出2中修改意见:
第一种:建议修改将id参数给与static::getInstance的lockId参数,并给Lock::lock增加第四个参数$lockConfigId。
第二种: 修改getInstance逻辑,将lockConfigId不存在时的逻辑进行优化,服于默认实现
实际业务使用示例:
第一种修改代码实现:
第二种修改代码实现:
The text was updated successfully, but these errors were encountered: