<div dir="ltr">Hi, <br><br>One problem, thanks for help.<br><br><br><span style="font-family:trebuchet ms,sans-serif"><font><span style="font-family:courier new,monospace">import gevent.monkey<br>gevent.monkey.match_all()<br>

<br>from lxml import etree<br># I using xpath parse the html<br><br><br>def _get(p):<br>    url = BUILD_URL(p)<br>    html = urllib2.urlopen(url)<br><br>    # RUN AT HERE AND BLOCKING<br><br>    # ver1<br>    tree = etree.parse(html, parse)<br>

<br>    # ver2<br>    # tree = etree.fromstring(html.read(), parse)<br><br>    ....<br><br><br>workers  = [gevent.spawn(_get, i) for i in xrange(1, 100)]<br>gevent.joinall(workers)</span></font><br></span><br><br><br>When using ver1,  etree.parse(html, parse)<br>

I noticed there are only two greenlets runs at "RUN AT HERE AND BLOCKING"<br><br>others are not running!<br><br><br>But, when I using ver2,  this code will running normally as expected.<br><br><br>Why this ? </div>