[tor-commits] [bridgedb/master] Rewrite database lock acquisition function