Killing httpserver-thread on gui quit
Erno Kuusela
erno-news at erno.iki.fi
Tue Aug 21 11:06:07 EDT 2001
In article <11aed8f9.0108210549.4e617422 at posting.google.com>,
joonas at olen.to (Joonas Paalasmaa) writes:
| How can I set up a gui and a httpserver threads.
| When gui's self.quit is executed,
| httpserver should stop aswell.
[...]
| thread1 = threading.Thread( target=httpd.serve_forever() )
if you don't want to serve forever, don't call serve_forever ;)
do something like...
while not want_quit:
httpd.handle_request()
-- erno
More information about the Python-list
mailing list