makepanda: Fix deprecated spelling for threading API

The new spelling is available since Python 2.6, so there is no chance of breakage here.
This commit is contained in:
rdb 2021-12-04 20:37:14 +01:00
parent 15c84afbe9
commit 985ec3061c
2 changed files with 4 additions and 4 deletions

View File

@ -7093,7 +7093,7 @@ def ParallelMake(tasklist):
# Create the workers # Create the workers
for slave in range(THREADCOUNT): for slave in range(THREADCOUNT):
th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue]) th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue])
th.setDaemon(1) th.daemon = True
th.start() th.start()
# Feed tasks to the workers. # Feed tasks to the workers.
tasksqueued = 0 tasksqueued = 0

View File

@ -24,7 +24,7 @@ SUFFIX_LIB = [".lib",".ilb"]
VCS_DIRS = set(["CVS", "CVSROOT", ".git", ".hg", "__pycache__"]) VCS_DIRS = set(["CVS", "CVSROOT", ".git", ".hg", "__pycache__"])
VCS_FILES = set([".cvsignore", ".gitignore", ".gitmodules", ".hgignore"]) VCS_FILES = set([".cvsignore", ".gitignore", ".gitmodules", ".hgignore"])
STARTTIME = time.time() STARTTIME = time.time()
MAINTHREAD = threading.currentThread() MAINTHREAD = threading.current_thread()
OUTPUTDIR = "built" OUTPUTDIR = "built"
CUSTOM_OUTPUTDIR = False CUSTOM_OUTPUTDIR = False
THIRDPARTYBASE = None THIRDPARTYBASE = None
@ -243,7 +243,7 @@ def ProgressOutput(progress, msg, target = None):
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
prefix = "" prefix = ""
thisthread = threading.currentThread() thisthread = threading.current_thread()
if thisthread is MAINTHREAD: if thisthread is MAINTHREAD:
if progress is None: if progress is None:
prefix = "" prefix = ""
@ -273,7 +273,7 @@ def ProgressOutput(progress, msg, target = None):
def exit(msg = ""): def exit(msg = ""):
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
if (threading.currentThread() == MAINTHREAD): if threading.current_thread() == MAINTHREAD:
SaveDependencyCache() SaveDependencyCache()
print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME)) print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME))
print(msg) print(msg)