can someone explain me this code: ---------------------------------- import thread stdoutmutex = thread.allocate_lock() exitmutexes = [0] * 10
def counter(myId, count): for i in range(count): stdoutmutex.acquire() print '[%s] => %s' % (myId, i) stdoutmutex.release() exitmutexes[myId] = 1 # signal main thread for i in range(10): thread.start_new(counter, (i, 100)) while 0 in exitmutexes: pass print 'Main thread exiting.' ----------------------------------- thread.start_new(counter, (i, 100)) is running counter function. Is counter function and while statement executed in same time (other things i understand, but can't get into this)? thanks -- http://mail.python.org/mailman/listinfo/python-list