On Sep 16, 9:33 pm, Steven D'Aprano
<ste...@remove.this.cybersource.com.au> wrote:
> def minmax(seq):
>     result = [None, None]
>     t1 = MMThread(seq, min, result, 0)
>     t2 = MMThread(seq, max, result, 1)
>     t1.start()
>     t2.start()
>     # Block until all threads are done.
>     while any([t1.isAlive(), t2.isAlive()]):
>         time.sleep(0)

Why not use "t1.join(); t2.join()" here?  Is there any benefit to do
it this way instead?

Carl Banks
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to