線程
#先全部start 再全部join,
cores=[core1,core2]
for c in cores:
c.start()
for c in cores:
c.join()GIL(Global Interpreter Lock)
CPU密集型 VS I/O密集型
concurrent.futures
Last updated
#先全部start 再全部join,
cores=[core1,core2]
for c in cores:
c.start()
for c in cores:
c.join()Last updated