pool tag

2 questions


1 answers
148 views
0
Question about Python multiprocessing.

a=[1,2,3,4,5]b=[]for c in a: b.append(c)print(b) # Output is [1,2,3,4,5]I'm trying to execute the above code quickly using multiprocessing.from multiprocessing import Poola=[1,2,3,4,5]def abc(a): b=[]...


1 answers
123 views
0
Pool.map Just a quick question...

if __name__ == '__main__': pool = Pool(processes=8) pool.map(loop1, range(3,10003)) pool.close() pool.join()Is it right that the eight processes do the same thing over and over again?For example, is ...


© 2024 OneMinuteCode. All rights reserved.