Open septfish opened 4 years ago
Hi @septfish. Can you share a code snippet that gives this error?
thanks :-)
def test2(): results = {} url_list = ['http://www.baidu.com'] async def worker(key, url): r = await s.get(url) results[key] = r
async def main(url_list):
url_dict = dict(enumerate(url_list))
for key, url in url_dict.items():
await curio.spawn(worker(key, url))
sorted_results = [response for _, response in sorted(results.items())]
s = asks.Session(connections=10)
curio.run(main(url_list))
return sorted_results
I followed the official documentation and added a link to report this. Using curio ’s taskgroups, there were no errors. Can anyone help me explain what the reasons are and how to operate them correctly