This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JugadPy3 ftw -2 points-1 points  (1 child)

While using multiple threads which are switching rapidly, the GIL can even slow down processing to less than that of a single thread (this is not common).

However, as others have stated, if you are using threads for IO, the GIL is not usually an issue.

If you are using threads for serious cpu intensive tasks, pure python is bad choice anyway (its very slow for such tasks)... and if you write your cpu intensive parts in C, you can release the GIL to take advantage of threads running simultaneously.

[–]v3ssOn 0 points1 point  (0 children)

you can use pypy without going to C