2019年9月12日

process对象的其他属性或者方法

摘要: #join方法import time, osfrom multiprocessing import Processdef task(name, n): print('%s is running'%name) time.sleep(n)if __name__ =='__main__': start = 阅读全文

posted @ 2019-09-12 21:36 别离 阅读(563) 评论(0) 推荐(0) 编辑

查看进程id的方法

摘要: from multiprocessing import Processimport timeimport osdef run(): print('%s is runing,parent is <%s>'%(os.getpid(), os.getppid())) time.sleep(3) print 阅读全文

posted @ 2019-09-12 20:38 别离 阅读(619) 评论(0) 推荐(0) 编辑

导航