diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 19aa7cc626..d9bfb9e4e3 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -7093,7 +7093,7 @@ def ParallelMake(tasklist): # Create the workers for slave in range(THREADCOUNT): th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue]) - th.setDaemon(1) + th.daemon = True th.start() # Feed tasks to the workers. tasksqueued = 0 diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 4e03d3c2e2..b785a36089 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -24,7 +24,7 @@ SUFFIX_LIB = [".lib",".ilb"] VCS_DIRS = set(["CVS", "CVSROOT", ".git", ".hg", "__pycache__"]) VCS_FILES = set([".cvsignore", ".gitignore", ".gitmodules", ".hgignore"]) STARTTIME = time.time() -MAINTHREAD = threading.currentThread() +MAINTHREAD = threading.current_thread() OUTPUTDIR = "built" CUSTOM_OUTPUTDIR = False THIRDPARTYBASE = None @@ -243,7 +243,7 @@ def ProgressOutput(progress, msg, target = None): sys.stdout.flush() sys.stderr.flush() prefix = "" - thisthread = threading.currentThread() + thisthread = threading.current_thread() if thisthread is MAINTHREAD: if progress is None: prefix = "" @@ -273,7 +273,7 @@ def ProgressOutput(progress, msg, target = None): def exit(msg = ""): sys.stdout.flush() sys.stderr.flush() - if (threading.currentThread() == MAINTHREAD): + if threading.current_thread() == MAINTHREAD: SaveDependencyCache() print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME)) print(msg)