python 多进程模块 multiprocessing

来源:互联网 发布:学校机房网络拓扑图 编辑:程序博客网 时间:2024/05/16 18:35
if __name__ == '__main__':   # 所有多进程操作要写在这个if 下. 进程关系决定的    multiprocessing.freeze_support()   #此句windows 上必须    print time.asctime( time.localtime(time.time()) )    pool=multiprocessing.Pool()    resultes=pool.map(Get_PageSource,urls)    pool.close()    pool.join()

原创粉丝点击