- import thread
- import time
- def counter(id,count):
- for i in range(count):
- print '[%s] = %s' %(id,i)
- for i in range(10):
- print thread.start_new(counter,(i,100))
- time.sleep(2)
- print 'exit\n'
Monday, May 05, 2008
Python Thread
Subscribe to:
Post Comments (Atom)
0 意見:
Post a Comment