Python
python2.7 thread 예제 코드
k1rha
2013. 5. 30. 22:51
python2.7 thread 예제 코드
import thread, time
def counter(id):
for i in range(5):
print 'id %s --> %s' % (id, i)
time.sleep(1)
for i in range(5):
thread.start_new_thread(counter, (i,))
time.sleep(5)
print 'Exiting'