この結果が必要です:
t0 = core 0 Loaded with process 0
t1 = core 1 Loaded with process 1
t2 = core 2 Loaded with process 2
t3 = core 0 Free // a serial processing for each core
t4 = core 0 Loaded with process 3
t5 = core core 1 Free
.... according process 0,1,2,3 takes, in theory the same time on any core
私が得ることなくp.join()
:
t0 = core 0 Loaded with process 0
t1 = core 1 Loaded with process 1
t2 = core 2 Loaded with process 2
t4 = core 0 Loaded with process 3 // two process on core 0
t5 = core 1 Loaded with process 4 // etc etc ...
私はp.join()
得る:
t0 = core 0 Loaded with process 0
t1 = core 0 Free // that is not multiprocessing ...
t2 = core 1 Loaded with process 1
t3 = core 1 Free
t4 = core 2 Loaded with process 2
t5 = core 2 Free
私はif !p.busy()
…のようなものを探しています。目的は、単一プロセスの画像サイズ変更プログラムをマルチプロセスに変換することです。
p.join()
から来た
p = Process(target=fonction, args=((process_id),filearg[file],t0))
p.start()
p.join()