From 6871824f9f87b63bdf5c863971df4c6a454f105c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 22 Jun 2022 13:14:13 +0300 Subject: Replace deprecated threading aliases (#69) --- paste/httpserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'paste/httpserver.py') diff --git a/paste/httpserver.py b/paste/httpserver.py index 0cfe6c2..8023bfd 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -764,7 +764,7 @@ class ThreadPool(object): worker = threading.Thread(target=self.worker_thread_callback, args=args, kwargs=kwargs, name=("worker %d" % index)) - worker.setDaemon(self.daemon) + worker.daemon = self.daemon worker.start() def kill_hung_threads(self): @@ -865,7 +865,7 @@ class ThreadPool(object): ids="\n ".join(map(str, found))), subject="Process restart (too many zombie threads)") self.shutdown(10) - print('Shutting down', threading.currentThread()) + print('Shutting down', threading.current_thread()) raise ServerExit(3) def worker_thread_callback(self, message=None): @@ -873,7 +873,7 @@ class ThreadPool(object): Worker thread should call this method to get and process queued callables. """ - thread_obj = threading.currentThread() + thread_obj = threading.current_thread() thread_id = thread_obj.thread_id = _thread.get_ident() self.workers.append(thread_obj) self.idle_workers.append(thread_id) -- cgit v1.2.1