文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>多线程编程

多线程编程

时间:2011-04-27  来源:孤独的猫

多线程编程需要引用threading包

import threading
class mythread(threading.Thread):
 def __init__(self,num):
  threading.Thread.__init__(self)
  self.num=num
 def run(self):
  print('I am ',self.num)
t1=mythread(1)
t2=mythread(2)
t3=mythread(3)
t1.start()
t2.start()
t3.start()
           

相关阅读 更多 +
排行榜 更多 +
涂色我贼强安卓版

涂色我贼强安卓版

休闲益智 下载
脑细胞太牛了手机版

脑细胞太牛了手机版

休闲益智 下载
球球的冒险旅途

球球的冒险旅途

休闲益智 下载