Threading question

Aahz Maruch aahz at
Thu Aug 2 14:42:16 CEST 2001

In article <9k9635$hli$1 at>,  <news at> wrote:
>In the following code snippet, is the if statement redundant?
>It seems to make no difference whether its there or not.
>if threading.currentThread().getName() == 'MainThread':
>    thread1.join()
>    thread2.join()
>    thread3.join()
>    thread4.join()

Yes, the "if" is redundant.  You might want to use a different method
for synchronizing with the threads, though.
                      --- Aahz  <*>  (Copyright 2001 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

"activist for accuracy"  --SJM

More information about the Python-list mailing list