On 26 September 2014 08:31, Glyph Lefkowitz <gl...@twistedmatrix.com> wrote:

> So, does anyone out there have any code which makes use of the
> aforementioned bad attributes of ThreadPool, whose applications would break
> if I removed them?  If so, how can I make you feel as bad about yourselves
> for using it as I feel bad about myself for writing it? ;-)
>


There are a few times in a codebase I help maintain where we want a thread
pool of all daemon threads. The code we have for this overrides
threadFactory() like so:


class DaemonThreadPool(ThreadPool):
    def threadFactory(self, *args, **kwargs):
        t = threading.Thread(*args, **kwargs)
        t.setDaemon(True)
        return t


How would I do this with your proposed new API?

Josh.
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to