Open TsingJyujing opened 4 years ago
@TsingJyujing
@eedalong Thank you for reply!!!!
I can't use Java because I'm writing a server with Python (the deep reason is PIL is convient in Python and Java do not have a such useful lib).
And I think it's also tricky to stop/kill the thread, I think we should use context manager to make a high level API to manage these troublism things like we described in #25 .
If you have intention to make this high level API, I'd like to make a PR, how about you idea?
@TsingJyujing check this out https://zhuanlan.zhihu.com/p/101913195
Pottery’s implementation of Redlock has an .extend()
method that does what you’re looking for. Disclaimer: I develop/maintain Pottery. Good luck!
I'd like to implement a function like we can extend a lock every N secs, the purpose to do that is designed for some transaction that can't control the timeout, but we also want the lock be released while the server is down.
Do you have any advice?