本文共 630 字,大约阅读时间需要 2 分钟。
timeprint'%s is running'13print'%s is end'#注意:在windows中Process()必须放到# if __name__ == '__main__':下if_'__main__''ALex'print'主函数'#linux下的就不需要if __name__ == '__main__':'renwu1'print'主函数'time__print'%s is runnging'13print'%s is end''renwu1'print'主函数'1print'hello'print'主函数/线程'print'主函数/进程'2print'hello'# 在主进程下开多个线程,每个线程都跟主进程的pid一样print'主函数pid/线程'# 在主进程下开多个进程,每个进程都有不同的pidprint'主函数pid/进程'301print'主函数/进程'time3printprintprintprintprintprint'主线程/主进程'time2print'%s say hello''egon'#试试注释这一行内容print'主线程'print1212time2print'%s say hello''egon'#必须在t.start()之前设置print'主线程'print//blog51112join32112121join#对公共数据的操作31.100213122141234,如需转载请自行联系原作者