《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
360 B

#!/usr/bin/env python
import threading
import time
count=1
class KissThread(threading.Thread):
def run(self):
global count
print "Thread # %s:Pretending to do stuff" % count
count+=1
time.sleep(2)
print "done with stuff"
for t in range(5):
KissThread().start()