summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/dummy/__init__.py9
-rw-r--r--Lib/multiprocessing/managers.py2
-rw-r--r--Lib/multiprocessing/pool.py8
3 files changed, 9 insertions, 10 deletions
diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py
index fe4ef96..48ca75b 100644
--- a/Lib/multiprocessing/dummy/__init__.py
+++ b/Lib/multiprocessing/dummy/__init__.py
@@ -53,12 +53,11 @@ class DummyProcess(threading.Thread):
else:
return None
-
is_alive = threading.Thread.is_alive
- get_name = threading.Thread.get_name
- set_name = threading.Thread.set_name
- is_daemon = threading.Thread.is_daemon
- set_daemon = threading.Thread.set_daemon
+ get_name = threading.Thread.getName
+ set_name = threading.Thread.setName
+ is_daemon = threading.Thread.isDaemon
+ set_daemon = threading.Thread.setDaemon
#
#
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 1fc7d6a..d7558c7 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -160,7 +160,7 @@ class Server(object):
except (OSError, IOError):
continue
t = threading.Thread(target=self.handle_request, args=(c,))
- t.set_daemon(True)
+ t.daemon = True
t.start()
except (KeyboardInterrupt, SystemExit):
pass
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py
index d7425d5..cb0e49f 100644
--- a/Lib/multiprocessing/pool.py
+++ b/Lib/multiprocessing/pool.py
@@ -99,15 +99,15 @@ class Pool(object):
args=(self._inqueue, self._outqueue, initializer, initargs)
)
self._pool.append(w)
- w.set_name(w.get_name().replace('Process', 'PoolWorker'))
- w.set_daemon(True)
+ w.name = w.get_name().replace('Process', 'PoolWorker')
+ w.daemon = True
w.start()
self._task_handler = threading.Thread(
target=Pool._handle_tasks,
args=(self._taskqueue, self._quick_put, self._outqueue, self._pool)
)
- self._task_handler.set_daemon(True)
+ self._task_handler.daemon = True
self._task_handler._state = RUN
self._task_handler.start()
@@ -115,7 +115,7 @@ class Pool(object):
target=Pool._handle_results,
args=(self._outqueue, self._quick_get, self._cache)
)
- self._result_handler.set_daemon(True)
+ self._result_handler.daemon = True
self._result_handler._state = RUN
self._result_handler.start()