Search code examples
pythongil

Why not GIL put little infuence on IO intensive multi threads


I have known that GIL affects multi threads when the thread execute CPU intensive task and it can not take advantage of multi cores.

But I feel very confused that it works well when the thread execute IO intensive task.I guess that the thread will release GIL when it is blocked.It's right?


Solution

  • I guess that the thread will release GIL when it is blocked.

    Yes, exactly.

    Principally, that's all needed in an answer :)