When are Python threads fast?
问题 We're all aware of the horrors of the GIL, and I've seen a lot of discussion about the right time to use the multiprocessing module, but I still don't feel that I have a good intuition about when threading in Python (focusing mainly on CPython) is the right answer. What are instances in which the GIL is not a significant bottleneck? What are the types of use cases where threading is the most appropriate answer? 回答1: Threading really only makes sense if you have a lot of blocking I/O going on.