Loops Executed by a Single Thread : Thread : Thread PYTHON TUTORIALS


PYTHON TUTORIALS » Thread » Thread »

 

Loops Executed by a Single Thread


from time import sleep, ctime

def loop0():
    print 'start loop at:', ctime()
    sleep(4)
    print 'loop done at:', ctime()

def loop1():
    print 'start loop at:', ctime()
    sleep(2)
    print 'loop done at:', ctime()

print 'starting at:', ctime()
loop0()
loop1()
print 'all DONE       at:', ctime()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Thread
» Thread