diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-06-22 13:14:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 11:14:13 +0100 |
commit | 6871824f9f87b63bdf5c863971df4c6a454f105c (patch) | |
tree | 830680a4c5665a9cf33cf9f58db0cd395137bc04 /paste/httpserver.py | |
parent | 225c7ebf34a9c90435932b690967538493a943ce (diff) | |
download | paste-git-6871824f9f87b63bdf5c863971df4c6a454f105c.tar.gz |
Replace deprecated threading aliases (#69)
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-x | paste/httpserver.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |