一、多进程

1、进程模块 multiprocessing

简单的创建一个进程

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author  : Willpower-chen

from multiprocessing import Process
def run(name):
    print('my name is %s'% name)
if __name__ == '__main__':
    p = Process(target=run,args=('lilei',))#创建一个进程实例
    p.start()
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2021-04-30
  • 2021-08-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案