Skip to content

Instantly share code, notes, and snippets.

@4383
Created June 4, 2019 16:57
Show Gist options
  • Save 4383/ad316b498b6d6b2beaed96f7a2f9b38c to your computer and use it in GitHub Desktop.
Save 4383/ad316b498b6d6b2beaed96f7a2f9b38c to your computer and use it in GitHub Desktop.
verify that the threading module come from the stdlib
import eventlet
import threading
eventlet.monkey_patch()
print(threading.current_thread.__module__)
# Will print "eventlet.green.threading"
assert threading.current_thread.__module__ == 'threading'
# Will raise the following assertion error:
# Traceback (most recent call last):
# File "eventlet_threading.py", line 13, in <module>
# assert threading.current_thread.__module__ == 'threading'
# AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment