<div dir="ltr"><br><div>Platform:</div><div>CPU: Intel (2x with 8 core each then hyper-threading gets us to 32 virtual)</div><div>Ubuntu 14.04</div><div>Python 3.4 (yes, I know)</div><div>Twisted 13.2.0</div><div><br></div><div>I use the vanilla twisted.internet.reactor.run() with the factory twisted.web.server.Site(root). It all runs just fine (seemingly) but,when I was snooping around on my machine, I had a ton of threads lying about. After cleaning up, I restarted my twisted application and found that I have 151 python3 threads lying about. I doubled checked and I have just twisted application running.</div><div><br></div><div>I browsed the documentation and the twisted thread pool claims to default between 5 and 10. However, I do abuse the deferToThread() cannot find any simple documentation on how that might feed back to the 151 threads. I thought maybe I need to exit the deferred returned from deferToThread() in some special way to clean it all up. However, I can find no documentation for it.</div><div><br></div><div>I have been googling about with many random search terms trying to puzzle the 151 threads from the documentation that tells me I should expect 5 to 10.</div><div><br></div><div>Can anyone please help understand why I have 151 threads and where they are coming from? Luckily they are all idle so the machine runs just fine.</div><div><br></div><div>The best story I can come up with is that there is one master thread on core-0 and then I get 10 threads in the pool for each of the other physical cores. However, the story is just numerology.</div><div><br></div></div>