• Kevin Modzelewski's avatar
    Switch to CPython's implementation of thread._local · f2b5a640
    Kevin Modzelewski authored
    CPython's implementation has quite a bit more features than our
    old one.  We only particularly need one of them (call __init__
    when accessed from a new thread), but it looks like there are
    some other features in there that have a decent chance of biting
    us in annoying ways (some gc-related stuff).
    
    That implementation forced some of the other work in this PR, of
    supporting weakrefs on extension objects (which this uses), and
    making object.tp_init get set the same way it does in CPython.
    f2b5a640
threading_local.py 746 Bytes