retry
retry copied to clipboard
Changed time.sleep to condition.wait()
time.sleep(n) is a kernel call that pauses the entire Python interpreter, Python threads a virtual. Using condition.wait(n) lets the other threads execute while waiting, this bypasses the GIL (global interpreter lock).
Enabled tests to run after commit. Please say if you want me to redo the request without the tests, or ask to fix the tests if needed.
Created this pull request for leshchenko1979, https://github.com/brookman1/retry/tree/condition_wait
Thanks.
Hi! This seems like an important update!
I've collected some the PRs from this repo to https://github.com/leshchenko1979/reretry.
If you could be so kind as to rebase your PR on that repo, I would gladly merge it there.
Added pull request with removal of prints and context manager changes, added a threaded test: https://github.com/invl/retry/pull/54