Created
June 4, 2019 16:57
-
-
Save 4383/ad316b498b6d6b2beaed96f7a2f9b38c to your computer and use it in GitHub Desktop.
verify that the threading module come from the stdlib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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