diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-06-11 19:14:14 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-06-11 19:14:14 (GMT) |
commit | 672b8031a803fa420cac91cdaab02130c1f8bed0 (patch) | |
tree | cff73aa339853806887dd85bf1df34f088532efe /Lib/multiprocessing/dummy | |
parent | 559e5d7f4d1155e95fb6f925c927a263f9196935 (diff) | |
download | cpython-672b8031a803fa420cac91cdaab02130c1f8bed0.zip cpython-672b8031a803fa420cac91cdaab02130c1f8bed0.tar.gz cpython-672b8031a803fa420cac91cdaab02130c1f8bed0.tar.bz2 |
Merged revisions 64125 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64125 | benjamin.peterson | 2008-06-11 12:27:50 -0500 (Wed, 11 Jun 2008) | 2 lines
give the threading API PEP 8 names
........
Diffstat (limited to 'Lib/multiprocessing/dummy')
-rw-r--r-- | Lib/multiprocessing/dummy/__init__.py | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py index 841d831..fe4ef96 100644 --- a/Lib/multiprocessing/dummy/__init__.py +++ b/Lib/multiprocessing/dummy/__init__.py @@ -48,24 +48,17 @@ class DummyProcess(threading.Thread): threading.Thread.start(self) def get_exitcode(self): - if self._start_called and not self.isAlive(): + if self._start_called and not self.is_alive(): return 0 else: return None - # XXX - if sys.version_info < (3, 0): - is_alive = threading.Thread.isAlive.__func__ - get_name = threading.Thread.getName.__func__ - set_name = threading.Thread.setName.__func__ - is_daemon = threading.Thread.isDaemon.__func__ - set_daemon = threading.Thread.setDaemon.__func__ - else: - is_alive = threading.Thread.isAlive - get_name = threading.Thread.getName - set_name = threading.Thread.setName - is_daemon = threading.Thread.isDaemon - set_daemon = threading.Thread.setDaemon + + 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 # # @@ -74,22 +67,22 @@ class DummyProcess(threading.Thread): class Condition(threading._Condition): # XXX if sys.version_info < (3, 0): - notify_all = threading._Condition.notifyAll.__func__ + notify_all = threading._Condition.notify_all.__func__ else: - notify_all = threading._Condition.notifyAll + notify_all = threading._Condition.notify_all # # # Process = DummyProcess -current_process = threading.currentThread +current_process = threading.current_thread current_process()._children = weakref.WeakKeyDictionary() def active_children(): children = current_process()._children for p in list(children): - if not p.isAlive(): + if not p.is_alive(): children.pop(p, None) return list(children) |