• Tim Peters's avatar
    Close a thread race in Connection.close(), diagnosed by Marius Gedminas. · ed1a090b
    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.
    ed1a090b
Connection.py 34.4 KB