How to get success/failure in case of thread

Skip Montanaro skip at pobox.com
Mon Jul 28 09:51:27 EDT 2003


    vivek>   import thread
    vivek>   thread.start_new_thread(my_func,(args,))

    vivek> here my_func will return true/1 on success and false/0 on
    vivek> failure. How can I check whether the function failed/succeeded
    vivek> ???

Have the function (or a wrapper function) put() the return value on a Queue
object, then get() it from there.

Skip





More information about the Python-list mailing list