retry
retry copied to clipboard
Nees a more threaded solution for sleep
Python has a consent of GIL since threads in Python are virtual. time.sleep stops execution of all the threads, so uses in Flask / Django / Twisted Matrix [used in Jupyter] are impaired.
api.py uses time.sleep(...), shout be more of:
from threading import Condition
c = Condition()
c.acquire()
c.wait(_delay)
c.release()
instead of time.sleep(...) . all references to time module should be removed from api.py.
In any case, thanks for the code! Lots of quirks handled nicely! Not sure what I'd do without it!
I made a sample fix on a fork here: https://github.com/brookman1/retry.git. Also, enabled tests to run after commit.