This repository has been archived on 2023-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
Considition-2020/launcher.py

23 lines
437 B
Python
Raw Permalink Normal View History

import main
2020-10-07 06:03:43 +02:00
import clearGames
2020-10-07 03:34:42 +02:00
from multiprocessing import Pool
proc_running = 4 # MAX 4!!!
def run_main(n):
result = main.main()
return result
def launch(list):
for result in list:
print("Game " + result[0] + " had a score of: " + str(result[1]))
if __name__ == '__main__':
2020-10-07 06:03:43 +02:00
clearGames.clear_it()
2020-10-07 03:34:42 +02:00
with Pool(proc_running) as p:
results = p.map(run_main, range(proc_running))
launch(results)