# pip install futures # coding=utf-8 import requests from tornado.concurrent import run_on_executor from concurrent.futures import ThreadPoolExecutor executor = ThreadPoolExecutor(20) @run_on_executor def test(): url = ‘http://www.baidu.com‘ r = requests.get(url)
时间: 2024-10-25 13:42:24