Commit b5b15abf authored by Denis Bilenko's avatar Denis Bilenko

concurrent_download.py: use patch_all() rather than patch_socket()

- patch_socket() does not patch ssl so it won't work on https urls (even though
  this example does not use https, someone might get an idea that it does)
parent ce34f672
......@@ -7,7 +7,9 @@ urls = ['http://www.google.com', 'http://www.yandex.ru', 'http://www.python.org'
import gevent
from gevent import monkey
monkey.patch_socket() # patches regular socket to yield to other greenlets
# patches stdlib (including socket and ssl modules) to cooperate with other greenlets
monkey.patch_all()
import urllib2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment