here is the program,<br><br># basic structure,omit something<br>import Queue<br>
import httplib2<br>
import threading<br>
jobs = Queue.Queue()<br>name=something #omit ,it is a web list to download<br>
for x in name:<br>
jobs.put(x)<br>
<br>
def download():<br>
while not jobs.empty():<br>
try:<br>
url = jobs.get()<br>
hx = httplib2.Http()<br>
resp, content = hx.request(url, headers=headers)<br>
jobs.task_done()<br>
except:<br>
print "wrong" , url <br>
<br>
if __name__ == '__main__':<br>
<br>
for i in range(10):<br>
threading.Thread(target=download).start() <br>
jobs.join()<br><br>when it run ,it can download someting ,<br>it is strang:there is wrong output ,some web can't get,but the program can't stop,it stay ,run ,can't fininsh,<br>i don't know why?<br>