retrieving the return code from a spawned thread.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JY

    retrieving the return code from a spawned thread.

    hi all,

    I would like to know how I can retrieve in my main thread (see
    [A]) the
    return code from a thread (see [B]) that I launched :

    [B]
    class example(threadi ng.Thread):

    def __init__(self, filename):
    self.filename = filename
    threading.Threa d.__init__(self )
    self.start()

    def run(self):
    ........
    rc = os.system("comm and example")

    [A] in the main thread:
    ......
    thrdExample = []
    thrdExample.app end(example(fil e))
    ......

    once thrdExample[i] is not active anymore, how can I test its return
    code "rc" if the main thread ??

    thanks in advance,
    JY
Working...