Threading question
Aahz Maruch
aahz at panix.com
Thu Aug 2 08:42:16 EDT 2001
In article <9k9635$hli$1 at news.netmar.com>, <news at aegis.mailshell.com> wrote:
>In the following code snippet, is the if statement redundant?
>It seems to make no difference whether its there or not.
>
>thread1.start()
>thread2.start()
>thread3.start()
>thread4.start()
>
>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 pobox.com)
Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
"activist for accuracy" --SJM
More information about the Python-list
mailing list