哪个并发模块最适合IO绑定任务?

2024-03-29 10:31:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要做许多DNS请求。我在看Python并发库,它在简介中说:

https://docs.python.org/3.4/library/concurrency.html

The appropriate choice of tool will depend on the task to be executed (CPU bound vs IO bound) and preferred style of development (event driven cooperative multitasking vs preemptive multitasking).

我的任务是IO绑定的,但是文档没有建议使用哪个模块。 哪个模块最适合IO绑定任务(例如,DNS请求)?在


Tags: 模块ofthehttpsioorgdocsdns