Auto reloads are incompatible with gevent
Opened this issue · 1 comments
cyberw commented
It seems reloadr doesnt work with gevent patching? Is this a known limitation? Is there possibly a workaround?
from reloadr import reloadr
from gevent import monkey
monkey.patch_all()
@reloadr
class Foo:
pass
Foo._start_watch_reload() # hangs forever
print("this is never executed")
I'm running python 3.7.7, reloadr 0.4.1 and gevent 20.9.0
Edit: manual reloads (Foo._reload()
) seem to work!
cyberw commented
Seems this is a known incompatibility with watchdog. Now that I know that manual reloads work, I may be able to do a hack workaround (like start a separate greenlet that reloads every second or so)