• Kevin Modzelewski's avatar
    Move our ThreadState handling closer to CPython's · 6eea2b47
    Kevin Modzelewski authored
    Our underlying implementation still looks pretty different, but
    rather than implement some newly-needed APIs completely from scratch,
    I copied in some of CPython's implementation.
    
    The result is a bit messy (multiple ways of doing similar things),
    but I think it's a step in the right direction.
    
    Regardless, this commit adds "clean up thread-local storage when the
    local object dies" functionality, as well as better cleanup when
    there are multiple threads.  I think this should help with the fork
    issues as well.
    6eea2b47
types.cpp 175 KB