Hi,
I have an application where the main frame start's a http server in a thread. The frame then use an wxIEHTML window to display the content from the server. So far so good.
The problem is that when I close my application (main.pyw) the http server is stil running ( There is an instance of pythonw in the task manager ). How can I terminate the threads that my app starts?
/cheers
Ronald
Ronald Jaramillo wrote:
Hi,
I have an application where the main frame start's a http server in a thread. The frame then use an wxIEHTML window to display the content from the server. So far so good.
The problem is that when I close my application (main.pyw) the http server is stil running ( There is an instance of pythonw in the task manager ). How can I terminate the threads that my app starts?
Send some kind of message to the thread that tells it to exit, and then call it's join method to wait for it to do so. Or set it as a deamon thread and then the process will be allowed to exit even if the thread is still running. See the Python docs on the threading module.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
Thanks Robin! Demonizing the thread did the trick = )
/mvh
Ronald
···
On Jan 21, 2004, at 4:04 AM, Robin Dunn wrote:
Ronald Jaramillo wrote:
Hi,
I have an application where the main frame start's a http server in a thread. The frame then use an wxIEHTML window to display the content from the server. So far so good.
The problem is that when I close my application (main.pyw) the http server is stil running ( There is an instance of pythonw in the task manager ). How can I terminate the threads that my app starts?Send some kind of message to the thread that tells it to exit, and then call it's join method to wait for it to do so. Or set it as a deamon thread and then the process will be allowed to exit even if the thread is still running. See the Python docs on the threading module.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org