Shutting down a cross-platform multithreaded app
james.harris.1 at gmail.com
Sat Sep 19 11:56:46 CEST 2015
"Laura Creighton" <lac at openend.se> wrote in message
news:mailman.5.1442609448.21674.python-list at python.org...
> In a message of Fri, 18 Sep 2015 20:09:19 +0100, "James Harris"
>>> Set the daemon flag on the worker threads, so when the main thread
>>> exits, the workers also exit.
>>Interesting idea, and I did not know that a *thread* could be a
>>Unfortunately, I think what you suggest would kill the threads stone
>>dead and not allow them to close connections.
> Can you stick your worker threads into a Queue. When the main thread
> have it tell the queue to clean itself up?
> The main thread doesn't have to be a gui ...
> (but the author of that recipe and I are now drunkly celebrating a
> so maybe I ought not to be posting this idea ...)
I am not sure. The polling every 100ms or similar in periodicCall() is
something I want to avoid. I think I have a way to do this without any
More information about the Python-list