mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
2to3 run of multiprocessing examples.
mp_benchmarks, mp_newtypes and mp_distribution are still broken but the others are working properly. We should include the examples in our unit test suite ...
This commit is contained in:
parent
94e0772989
commit
aae1b70a83
6 changed files with 177 additions and 177 deletions
|
|
@ -65,9 +65,9 @@ def test():
|
|||
Process(target=worker, args=(task_queue, done_queue)).start()
|
||||
|
||||
# Get and print results
|
||||
print 'Unordered results:'
|
||||
print('Unordered results:')
|
||||
for i in range(len(TASKS1)):
|
||||
print '\t', done_queue.get()
|
||||
print('\t', done_queue.get())
|
||||
|
||||
# Add more tasks using `put()`
|
||||
for task in TASKS2:
|
||||
|
|
@ -75,7 +75,7 @@ def test():
|
|||
|
||||
# Get and print some more results
|
||||
for i in range(len(TASKS2)):
|
||||
print '\t', done_queue.get()
|
||||
print('\t', done_queue.get())
|
||||
|
||||
# Tell child processes to stop
|
||||
for i in range(NUMBER_OF_PROCESSES):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue