artyomboyko
artyomboyko

Reputation: 2871

Gevent monkey unpatch

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.

Upvotes: 5

Views: 3538

Answers (1)

Trevor
Trevor

Reputation: 9578

reload(socket)

This blog post has a pretty good write up of the solution here: https://emptysqua.re/blog/undoing-gevents-monkey-patching/

Upvotes: 7

Related Questions