Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto reloads are incompatible with gevent #11

Open
cyberw opened this issue Feb 7, 2021 · 1 comment
Open

Auto reloads are incompatible with gevent #11

cyberw opened this issue Feb 7, 2021 · 1 comment

Comments

@cyberw
Copy link

cyberw commented Feb 7, 2021

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 cyberw changed the title incompatible with gevent? Auto reloads are incompatible with gevent Feb 7, 2021
@cyberw
Copy link
Author

cyberw commented Feb 7, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant