The python
threading
documentation states that "...threading is still an appropriate model
if you want to run multiple I/O-bound tasks simultaneously",
apparently because I/O-bound processes can avoid the GIL that prevents
threads from concurrent execution in CPU-bound tasks.
But what I dont understand is that an I/O task still uses the CPU. So
how could it not encounter the same issues? Is it because the I/O
bound task will not require memory management?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…