Gevent monkey unpatch
-
13-06-2021 - |
Question
I'm doing my program in many steps. One of them is to use gevent + monkey patch
from gevent import monkey; monkey.patch_all()
Everything works great. But can i unpatch it after i'm done using it ? I want to return to my default socket functions.
Solution
reload(socket)
This blog post has a pretty good write up of the solution here: https://emptysqua.re/blog/undoing-gevents-monkey-patching/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow