retry icon indicating copy to clipboard operation
retry copied to clipboard

Changed time.sleep to condition.wait()

Open brookman1 opened this issue 4 years ago • 2 comments
trafficstars

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.

brookman1 avatar Oct 08 '21 16:10 brookman1

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.

leshchenko1979 avatar May 04 '22 17:05 leshchenko1979

Added pull request with removal of prints and context manager changes, added a threaded test: https://github.com/invl/retry/pull/54

brookman1 avatar May 17 '22 17:05 brookman1