def _cleanThreads(self):
reactor = self._getReactor()
if interfaces.IReactorThreads.providedBy(reactor):
if reactor.threadpool is not None:
# Stop the threadpool now so that a new one is created.
# This improves test isolation somewhat (although this is a
# post class cleanup hook, so it's only isolating classes
# from each other, not methods from each other).
reactor._stopThreadPool()
评论列表
文章目录