On Mar 24, 9:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > In my python scripts, I create thread likes this: > // for example threadCount is 10 > for j in range(int(threadCount)): > t = MyThread() > t.start() > > // wait all the threads are done > doSomething() > > My question is how can i tell when all the threads are done before I > call doSomething()? >
If you are using the threading module for your threads, Thread objects have a join method that you could call. Stash away all your Thread objects in a list and call join() on all of them. -- Kushal Kumaran -- http://mail.python.org/mailman/listinfo/python-list