# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1467380836 -19800
#      Fri Jul 01 19:17:16 2016 +0530
# Node ID e61d384e3be4cf18e753ea3fc95658a69dbbfd82
# Parent  0c741fd6158a5bedd6ad339ecad682d3c127a446
keepalive: switch from thread to threading module

The thread module in py3 is renamed to _thread, but we can use
 the high level threading module instead.

diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -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