Teile 10 bis 12.

This commit is contained in:
2023-03-28 12:26:50 +02:00
parent 298151634d
commit f7a5db9f39
27 changed files with 6459 additions and 75 deletions

12
teil12/pool2.py Normal file
View File

@@ -0,0 +1,12 @@
# Quelle: https://stackoverflow.com/questions/35528093/multithreading-in-python-with-a-threadpool
from multiprocessing import Pool
import sys
if __name__ == '__main__':
job_list = [range(10000000)]*6
print(f'{job_list}')
p = Pool(2)
print("Parallel map")
print(p.map(sum, job_list))