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

Call gevent.monkey.patch_all immediately on import (#703) #17

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

allwyn-pradip
Copy link
Owner

The api makes use of gevent, a coroutine based networking
library which relies heavily on monkey patching the stdlib.

From the gevent.monkey docs:

Warning Patching too late can lead to unreliable behaviour
(for example, some modules may still use blocking sockets) or even errors.

This appears to have happened here. Thanks to @allwyn-pradip for
pointing me at the right file in PR
linkedin#690.

Resolves linkedin#686, linkedin#699, linkedin#644.

Blog on gevent: https://eng.lyft.com/what-the-heck-is-gevent-4e87db98a8

In the case of gevent — monkey patching has to be the absolute first thing a process does

The api makes use of [gevent], a coroutine based networking
library which relies heavily on monkey patching the stdlib.

From the [gevent.monkey] docs:
> Warning Patching too late can lead to unreliable behaviour
> (for example, some modules may still use blocking sockets) or even errors.

This appears to have happened here. Thanks to @allwyn-pradip for
pointing me at the right file in PR
#690.

Resolves #686, #699, #644.

Blog on gevent: https://eng.lyft.com/what-the-heck-is-gevent-4e87db98a8
> In the case of gevent — monkey patching has to be the absolute first thing a process does

[gevent]: https://www.gevent.org/index.html
[gevent.monkey]: https://www.gevent.org/api/gevent.monkey.html
@allwyn-pradip allwyn-pradip merged commit 4be2da7 into allwyn-pradip:iris-master-fw Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants