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.

Was it helpful?

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
scroll top