[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 that it would be easier not to edit

I feel that my proposed change handles that in a reasonable way, and doesn't 
complicate the interface for threads terribly. Most users can completely ignore 
the new method I proposed, and it won't affect them. For those going to look 
for it, it'll be there.

But again, I'm not even working in Python and no one else has chimed in on this 
in five years. Does it matter anymore?

- Michael

> On Nov 30, 2016, at 1:58 PM, Julien Palard <rep...@bugs.python.org> wrote:
> 
> 
> Julien Palard added the comment:
> 
> If nobody has nothing to add on this issue, I think it just should be closed.
> 
> --
> 
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue10444>
> ___

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10444>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
versions of the Python interpreter we were using in our app didn't block.
I'd like an option to override the blocking, because for our application, for 
the most part, we do want it to always quit and not wait for threads to quit 
properly.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10444
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
components: Library (Lib)
messages: 121354
nosy: michaelahughes
priority: normal
severity: normal
status: open
title: A mechanism is needed to override waiting for Python threads to finish
type: feature request
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10444
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. 
By default, the whole thing blocks.

--
keywords: +patch
Added file: http://bugs.python.org/file19625/threadingchange.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10444
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue10444
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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().waitForThreadsOnExitFunc = threadendcallback

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10444
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com