十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
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)