多进程 vs 多线程

62.3 多进程 vs 多线程

根据任务类型选择。

  • CPU 密集(计算、加密)→ multiprocessing
  • I/O 密集(下载、读写)→ threading / asyncio