[issue10444] A mechanism is needed to override waiting for Python threads to finish

2010-11-17 Thread Michael Hughes
New submission from Michael Hughes michaelahug...@gmail.com: We use the Python interpreter embedded in our application, and would prefer to not block an exit of our application waiting for non-daemon threads to finish. I would like a mechanism exposed that queries for whether or not to wait

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2010-11-17 Thread Michael Hughes
Michael Hughes michaelahug...@gmail.com added the comment: I have a patch here. It is to allow for a callback to be set on the main thread which gets called when there are non-daemon threads still alive on exit. The callback returns True or False indicating whether or not it wants to block

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2010-11-17 Thread Michael Hughes
Changes by Michael Hughes michaelahug...@gmail.com: Removed file: http://bugs.python.org/file19625/threadingchange.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10444

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2010-11-17 Thread Michael Hughes
Michael Hughes michaelahug...@gmail.com added the comment: Scratch that last patch. It was missing part of the fix. I've removed the old patch now, and submitted the proper one. -- Added file: http://bugs.python.org/file19626/real.patch ___ Python

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2010-11-17 Thread Michael Hughes
Michael Hughes michaelahug...@gmail.com added the comment: To use the callback, you can do this: import threading def threadendcallback(): # return False to indicate that we don't # want to wait for any threads before exiting return False threading.currentThread

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2011-03-19 Thread Michael Hughes
Michael Hughes michaelahug...@gmail.com added the comment: Hey guys We don't always have control over all of the threads launched within our application. We might have inexperienced users writing basic scripts using threads, but they don't know enough about setting them to Daemon. Previous

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2016-12-01 Thread Michael Hughes
Michael Hughes added the comment: Given that this is from five years ago, and I've moved on, I honestly can't say I care too deeply about this. My use case was for handling threads: * created by inexperienced python programmers that don't know about daemons * using third party python scripts