Passing Exceptions Across Threads

aurelien.campeas at free.fr aurelien.campeas at free.fr
Wed Apr 26 05:35:34 EDT 2006


have you tried replacing :

main = threading._MainThread()

with

main = threading.currentThread()  ?

(not sure if that will be sufficient)

Well your way to pass exception between threads looks like I would have
done myself. But I am no expert.

Have you considered using stackless Python ? It provides a much safer
and efficient threading model (thinking about your physics simulator).
Of course, if you want not to block on blocking calls (socket stuff),
real threads are a way to go.




More information about the Python-list mailing list