C-extension not threadable?

Martin v. Loewis martin at v.loewis.de
Wed Apr 17 18:27:37 EDT 2002


Dave Cole <djc at object-craft.com.au> writes:

> If you create a new thread state for the callback, what will happen to
> Python exceptions raised in the callback?

They propagate back to the bottom of the callback. If you don't treat
them special, deleting the thread state will also release the
exception object and traceback object. Assuming the thread callback
came "out of nowhere", there is nothing reasonable to do, anyway: you
might want to print the exception to stderr or something like that.

Regards,
Martin




More information about the Python-list mailing list