title: example urllib3 and threading in python
body: <p>I am trying to use urllib3 in simple thread to fetch several wiki pages. 
  The script will</p>
  
  <p>Create 1 connection for every thread (I don't understand why) and Hang forever.
  Any tip, advice or simple example of urllib3 and threading</p>
  
  <pre><code>import threadpool
  from urllib3 import connection_from_url
  
  HTTP_POOL = connection_from_url(url, timeout=10.0, maxsize=10, block=True)
  
  def fetch(url, fiedls):
    kwargs={'retries':6}
    return HTTP_POOL.get_url(url, fields, **kwargs)
  
  pool = threadpool.ThreadPool(5)
  requests = threadpool.makeRequests(fetch, iterable)
  [pool.putRequest(req) for req in requests]
  </code></pre>
  
  <p>@Lennart's script got this error:</p>
  
  <pre><code>http://en.wikipedia.org/wiki/2010-11_Premier_LeagueTraceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/threadpool.py", line 156, in run
   http://en.wikipedia.org/wiki/List_of_MythBusters_episodeshttp://en.wikipedia.org/wiki/List_of_Top_Gear_episodes http://en.wikipedia.org/wiki/List_of_Unicode_characters    result = request.callable(*request.args, **request.kwds)
    File "crawler.py", line 9, in fetch
      print url, conn.get_url(url)
  AttributeError: 'HTTPConnectionPool' object has no attribute 'get_url'
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/threadpool.py", line 156, in run
      result = request.callable(*request.args, **request.kwds)
    File "crawler.py", line 9, in fetch
      print url, conn.get_url(url)
  AttributeError: 'HTTPConnectionPool' object has no attribute 'get_url'
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/threadpool.py", line 156, in run
      result = request.callable(*request.args, **request.kwds)
    File "crawler.py", line 9, in fetch
      print url, conn.get_url(url)
  AttributeError: 'HTTPConnectionPool' object has no attribute 'get_url'
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/threadpool.py", line 156, in run
      result = request.callable(*request.args, **request.kwds)
    File "crawler.py", line 9, in fetch
      print url, conn.get_url(url)
  AttributeError: 'HTTPConnectionPool' object has no attribute 'get_url'
  </code></pre>
  
  <p>After adding <code>import threadpool; import urllib3</code> and <code>tpool = threadpool.ThreadPool(4)</code> @user318904's code got this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "crawler.py", line 21, in &lt;module&gt;
      tpool.map_async(fetch, urls)
  AttributeError: ThreadPool instance has no attribute 'map_async'
  </code></pre>