returning a value from a thread

David Bolen db3l at fitlinxx.com
Wed Jul 14 13:49:27 EDT 2004


Christopher T King <squirrel at WPI.EDU> writes:

> Just don't forget to .join() on the thread in module1 before accessing the 
> container object! (Assuming you're using threading) I just wish Python's 
> .join() could return values, like pthread_join can.

Although if you can join on the thread, then you have to have a
reference to the thread object, at which point you can do anything you
want in terms of permitting state to be interrogated on that object
(direct attribute access, getters, etc...), which is even better than
having join return an object.

-- David



More information about the Python-list mailing list