28 Sep
2014
28 Sep
'14
6:56 p.m.
On 26 September 2014 08:31, Glyph Lefkowitz
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.