Skip to content

Commit 4c720f5

Browse files
author
root
committed
just add or update data
1 parent 76a5785 commit 4c720f5

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

ThreadBase/ThreadExam2.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'''
2+
Created on 2012-10-26
3+
4+
@author: root
5+
'''
6+
7+
import threading
8+
import time
9+
10+
count = 1
11+
12+
class KissThread(threading.Thread):
13+
def run(self):
14+
global count
15+
print "Thread # %s: Pretending to do stuff" % count
16+
count +=1
17+
time.sleep(2)
18+
print "done with stuff"
19+
20+
for t in range(5):
21+
KissThread().start()

0 commit comments

Comments
 (0)