Skip to content
  • Damien George's avatar
    unix: Disable the GIL to improve performance of non-thread code. · 3096928d
    Damien George authored
    Threading support is still very new so stay conservative at this point
    and enable threading without the GIL.  This requires users to protect
    concurrent access of mutatable Python objects (eg lists) with locks at
    the Python level (something you should probably do anyway).  The
    advantage is that there is less of a performance hit for non-threaded
    code, because the VM does not need to constantly release/acquire the GIL.
    
    In the future the GIL will be made more efficient.  There is also room to
    improve the efficiency of non-GIL code by not using mutex's if there is
    only one thread active.
    3096928d