Closed AndreiPashkin closed 8 years ago
I believe that it will never be called due to the cycle (lock holds ref to thread, thread hold ref to lock).
Maybe we should do something with weakrefs in the thread instead?
Indeed, you right. But how to test it then?
Use short expiry. Then check redis directly if it's gone. Gonna be one of them slow tests ...
We can take a look at this after 3.0 right?
I still have enough time, so probably yes. Don't close my pending PRs plz, I will back to them as soon as I will have time.
I factored out InterruptableThread
- because it's sole purpose was to hold reference to the semaphore, which doesn't make sense to me.
@ionelmc, I think, the PR is ready for merging.
It looks like there's some failure on travis (the linux oom killer doing its thing: https://travis-ci.org/ionelmc/python-redis-lock/jobs/119551661#L2808)
@ionelmc, wow, that's strange. Do you have any ideas?
Hah, I was hoping you have some. It looks like a memory leak that happens once in a while. Might be simply some unclean test code or a real bug ...
My best guess is that "this is something to do with coverage". I also can't reproduce it (#43).
Subj.