Exceptions in threads

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Thu Jan 24 14:28:30 EST 2002


Martin von Loewis <loewis at informatik.hu-berlin.de> wrote:

>With this architecture, a thread that terminates with an exception
>will invoke a onException operation on the parent thread. However,
>this invocation will occur in the content of the *child* thread, not
>in the context of the parent thread. Having the parent thread execute
>something else just makes no sense.

I was, perhaps, not clear. onException would be a method of the child
thread class and execute in that thread.

Implementing such a scheme in code isn't a problem. What concerns me
is the scope for exceptions in the thread initialisation (mainly) and
termination which are outside the controlled block.

Is it possible, for example, for initialisation to fail owing to a
memory shortage?
--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list