import threading
import time
成都創(chuàng)新互聯(lián)專注于盤(pán)龍企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站開(kāi)發(fā),商城系統(tǒng)網(wǎng)站開(kāi)發(fā)。盤(pán)龍網(wǎng)站建設(shè)公司,為盤(pán)龍等地區(qū)提供建站服務(wù)。全流程專業(yè)公司,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
def loop01(in01):
print("start loop01 at : {0}".format(time.ctime()))
print("loop01參數(shù):{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參數(shù),第一個(gè)參數(shù){0},第二個(gè)參數(shù){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參數(shù)",))
t2 = threading.Thread(target=loop02,args=("loop02參數(shù)1","loop02參數(shù)2"))
t1.start()
t2.start()
t1.join()
t2.join()
print("All done at {0}".format(time.ctime()))
while True:
time.sleep(10)