Killing subservient threads

jimzat jimzat at
Fri Feb 20 17:47:27 CET 2009

I am trying to create an app which will have a main window from which
the user will launch other (children) windows.

When I launch the child window I start a new thread which periodically
polls another device and updates the child window accordingly.  When I
dismiss the child window the "polling" thread stays alive and then
crashes with an exception when trying to write to the now defunct
child window.

How can I handle this?  I want to either 1) have the destructor for
the child window kill the spawned thread or 2) catch the exception
within the "polling" thread and see that the child window is gone and
then commit suicide.

I am an experienced embedded C programmer but have VERY little
experience with GUI programming and no experience in the Micro$oft
programming world.

More information about the Python-list mailing list