• Tim Peters's avatar
    Close a thread race in Connection.close(), diagnosed by Marius Gedminas. · a4375ae9
    Tim Peters authored
    DB._closeConnection() sets the connection's _db member to None now, under
    protection of the lock it holds anyway.  At a deeper level, it's unclear
    why _db keeps getting set and unset to begin with, but no time for that
    now (and there are already XXX comments about it in the code).
    
    Alas, I wasn't able to write a test that provoked the original bug in
    finite time (it's a tiny timing hole), except via calling sleep() between
    two lines that don't exist anymore.  Good enough.
    a4375ae9
Connection.py 34.4 KB