exception from a thread

_spitFIRE timid.Gentoo at gmail.com
Thu Jun 28 17:06:14 EDT 2007


assume a scenario, where there is a class that for doing some work,
spawns lot of threads.

class X:
    def __init__(self):
        # Spawns some threads to
        # do some work

now, assuming that at least one of the threads encounters a problem
while doing work and throws an exception. Would I be able to handle
that error in the caller class? When I try to do this, I see that the
errors thrown by the threads never cascade to this caller :(




More information about the Python-list mailing list