>
>
>
>> In my continuing quest the find the best way of doing this I came across
>> the following method:
>>
>>     for thread in threading.enumerate():
>>         if thread is not threading.currentThread():
>>             thread.join()
>>     print 'FINISHED'
>>
>> 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).
>>
>> 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.
>>
>
> Thanks for the postbacks, it's been useful/interesting for me.
>
> Best,
>
> Walter
>

I'm really pleased that it was of some help to somebody else too.

Kind Regards,

Chris
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to