<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<br><div class="gmail_quote"><div>In my continuing quest the find the best way of doing this I came across the following method:<br><br> for thread in threading.enumerate():<br>
if thread is not threading.currentThread():<br>
thread.join()<br>
print 'FINISHED'<br><br>In my newbie understanding, you can't join() the current thread, because it's the main thread (the one from which the others are called), join()ing it would lock the program up (it would never complete). <br>
<br>The above only join()s a thread if it isn't the current thread, thus (hopefully) getting around this. Swapping my earlier stupid code for this seems to work as expected in my tests.<br></div></div></blockquote></div>
<br></div>Thanks for the postbacks, it's been useful/interesting for me.<br><br>Best,<br><font color="#888888"><br>Walter<br></font></blockquote><div><br></div><div>I'm really pleased that it was of some help to somebody else too. </div>
<div><br></div><div>Kind Regards,</div><div><br>Chris</div></div>