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/pool.py | |
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/pool.py')
-rw-r--r-- | Lib/multiprocessing/pool.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py index 3d5d275..d7425d5 100644 --- a/Lib/multiprocessing/pool.py +++ b/Lib/multiprocessing/pool.py @@ -107,7 +107,7 @@ class Pool(object): target=Pool._handle_tasks, args=(self._taskqueue, self._quick_put, self._outqueue, self._pool) ) - self._task_handler.setDaemon(True) + self._task_handler.set_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.setDaemon(True) + self._result_handler.set_daemon(True) self._result_handler._state = RUN self._result_handler.start() @@ -213,7 +213,7 @@ class Pool(object): @staticmethod def _handle_tasks(taskqueue, put, outqueue, pool): - thread = threading.currentThread() + thread = threading.current_thread() for taskseq, set_length in iter(taskqueue.get, None): i = -1 @@ -252,7 +252,7 @@ class Pool(object): @staticmethod def _handle_results(outqueue, get, cache): - thread = threading.currentThread() + thread = threading.current_thread() while 1: try: @@ -346,7 +346,7 @@ class Pool(object): # task_handler may be blocked trying to put items on inqueue debug('removing tasks from inqueue until task handler finished') inqueue._rlock.acquire() - while task_handler.isAlive() and inqueue._reader.poll(): + while task_handler.is_alive() and inqueue._reader.poll(): inqueue._reader.recv() time.sleep(0) @@ -362,7 +362,7 @@ class Pool(object): debug('helping task handler/workers to finish') cls._help_stuff_finish(inqueue, task_handler, len(pool)) - assert result_handler.isAlive() or len(cache) == 0 + assert result_handler.is_alive() or len(cache) == 0 result_handler._state = TERMINATE outqueue.put(None) # sentinel @@ -591,6 +591,6 @@ class ThreadPool(Pool): try: inqueue.queue.clear() inqueue.queue.extend([None] * size) - inqueue.not_empty.notifyAll() + inqueue.not_empty.notify_all() finally: inqueue.not_empty.release() |