Created
June 8, 2020 18:14
-
-
Save flushentitypacket/eef6deebb0e6120090d9153bb86225ec to your computer and use it in GitHub Desktop.
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
# short test script to check whether request timeouts are affected by thread lock | |
import gevent | |
import gevent.monkey | |
import requests | |
import time | |
gevent.monkey.patch_all() | |
def get_ex(): | |
return requests.get("https://example.com", timeout=0.1) | |
glet = gevent.spawn(get_ex) | |
time.sleep(5) | |
print("hi") | |
print(glet.value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment