GIL in python and its disadvantages..

Home Forums Python Programming GIL in python and its disadvantages..

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1946 Reply
    Humble
    Keymaster

    GIL or global interpreter lock in python is always in discussion. The python instructions are executed in an interpreter which is locked by a global lock and its called GIL. Because of that, it has been reported that, the multithreading application does not take advantage of multi core systems. Because any thread can execute in any core of the system at a point in time. How-ever, as these threads have to acquire the global lock , the python multithreading does not take advantage of the multicore systems.

    How-ever it has been claimed that blocking operations works or does not depend on this GIL, so claimed to be better performance than single threaded program in python.
    Even-thohgh cpython is restricted to this ,..not all python implementations have this restriction..

    Also the recommendation is to use multiprocessing instead of multithreading ..

Viewing 1 post (of 1 total)
Reply To: GIL in python and its disadvantages..
Your information: