mercurial/keepalive.py
changeset 29456 e61d384e3be4
parent 29455 0c741fd6158a
child 30463 bc0def54c17d
--- a/mercurial/keepalive.py	Tue Jun 28 16:01:53 2016 +0530
+++ b/mercurial/keepalive.py	Fri Jul 01 19:17:16 2016 +0530
@@ -113,7 +113,7 @@
 import hashlib
 import socket
 import sys
-import thread
+import threading
 
 from . import (
     util,
@@ -135,7 +135,7 @@
       * keep track of all existing
       """
     def __init__(self):
-        self._lock = thread.allocate_lock()
+        self._lock = threading.Lock()
         self._hostmap = {} # map hosts to a list of connections
         self._connmap = {} # map connections to host
         self._readymap = {} # map connection to ready state