重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
import threading
import time
成都创新互联专注于盘龙企业网站建设,响应式网站开发,商城系统网站开发。盘龙网站建设公司,为盘龙等地区提供建站服务。全流程专业公司,专业设计,全程项目跟踪,成都创新互联专业和态度为您提供的服务
def loop01(in01):
print("start loop01 at : {0}".format(time.ctime()))
print("loop01参数:{0}".format(in01))
time.sleep(4)
print("end loop01 at : {0}".format(time.ctime()))
def loop02(in01, in02):
print('start loop02 at : {0}'.format(time.ctime()))
print("loop02参数,第一个参数{0},第二个参数{1}".format(in01,in02))
time.sleep(2)
print("end loop02 at : {0}".format(time.ctime()))
if name== 'main':
print("Starting at : {0}".format(time.ctime()))
t1 = threading.Thread(target=loop01,args=("loop01参数",))
t2 = threading.Thread(target=loop02,args=("loop02参数1","loop02参数2"))
t1.start()
t2.start()
t1.join()
t2.join()
print("All done at {0}".format(time.ctime()))
while True:
time.sleep(10)