import multiprocessing as mp
import time def name_and_time(name,num):
print(f"Hello {name}, current time is {time.time()} ({num})")
print('Sleeping for 2 seconds ...')
time.sleep(2)
print("After sleeping ... exiting function") if __name__ == '__main__':
process_list = list() for i in range(100):
process = mp.Process(target=name_and_time,args=('Andrei',i))
process_list.append(process) for p in process_list:
p.start() for p in process_list:
p.join() print('Other instructions of the main module....')
print('End of Script')

最新文章

  1. 【腾讯Bugly干货分享】微信终端跨平台组件 Mars 系列 - 我们如约而至
  2. linux 登录档配置分析
  3. ASP.NET MVC 请求流程:Controller
  4. 时间:UTC时间、GMT时间、本地时间、Unix时间戳
  5. Oracle Goldengate和Oracle Data Integrator的初步认识
  6. 常见的Activity Action Intent常量
  7. C Primer Plus之C预处理器和C库
  8. Spring4.0学习笔记(1) —— 基础知识
  9. hdu1358Period
  10. createThread和_beginthreadex区别
  11. 正则表达式过滤HTML、JS、CSS
  12. 学会用git真的很重要
  13. webpack代码分离 ensure 看了还不懂,你打我(转)
  14. VS与Windbg调试
  15. 干货型up主
  16. python -- 内置模块02
  17. 使用jQuery+huandlebars防止编码注入攻击
  18. Prometheus Redis_exporter
  19. 1.23 codeforces div3 C.Nice Garland
  20. _itemmod_extract_enchant随机附魔提取

热门文章

  1. mysql 取出分组后价格最高的数据
  2. UI设计圈年终福利,错过一次等一年!
  3. java,抽象类,接口的方法,子类继承是不是必须全部实现
  4. ASP.NET Core Web API通过中间件或UseExceptionHandler异常处理方法
  5. C语言printf输出32位十六进制
  6. 1996. 游戏中弱角色的数量 (Medium)
  7. while跟if循环
  8. QLineEdit CSS样式
  9. mac新仙剑奇侠传 2018
  10. Localstorage、sessionStorage、cookie 的区别