mirror of
https://github.com/python/cpython.git
synced 2025-11-30 06:48:54 +00:00
xrange -> range
This commit is contained in:
parent
90198fa629
commit
87b8719869
1 changed files with 2 additions and 2 deletions
|
|
@ -550,7 +550,7 @@ class MultiprocessRefactoringTool(RefactoringTool):
|
||||||
raise RuntimeError("already doing multiple processes")
|
raise RuntimeError("already doing multiple processes")
|
||||||
self.queue = multiprocessing.JoinableQueue()
|
self.queue = multiprocessing.JoinableQueue()
|
||||||
processes = [multiprocessing.Process(target=self._child)
|
processes = [multiprocessing.Process(target=self._child)
|
||||||
for i in xrange(num_processes)]
|
for i in range(num_processes)]
|
||||||
try:
|
try:
|
||||||
for p in processes:
|
for p in processes:
|
||||||
p.start()
|
p.start()
|
||||||
|
|
@ -558,7 +558,7 @@ class MultiprocessRefactoringTool(RefactoringTool):
|
||||||
doctests_only)
|
doctests_only)
|
||||||
finally:
|
finally:
|
||||||
self.queue.join()
|
self.queue.join()
|
||||||
for i in xrange(num_processes):
|
for i in range(num_processes):
|
||||||
self.queue.put(None)
|
self.queue.put(None)
|
||||||
for p in processes:
|
for p in processes:
|
||||||
if p.is_alive():
|
if p.is_alive():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue