📜  多处理一个for循环python代码示例

📅  最后修改于: 2022-03-11 14:45:49.068000             🧑  作者: Mango

代码示例1
from multiprocessing import Pool

def process_image(name):
    sci=fits.open('{}.fits'.format(name))
    

if __name__ == '__main__':
    pool = Pool()                         # Create a multiprocessing Pool
    pool.map(process_image, data_inputs)  # process data_inputs iterable with pool