Commit 06911658 authored by Denis Bilenko's avatar Denis Bilenko

Hub.destroy(): do not include join(), let the caller do it; also close resolver and threadpool

parent c547e2fe
......@@ -418,8 +418,12 @@ class Hub(greenlet):
def destroy(self):
global _threadlocal
result = self.join()
assert result is True, result
if self._resolver is not None:
self._resolver.close()
del self._resolver
if self._threadpool is not None:
self._threadpool.close()
del self._threadpool
self.loop.destroy()
del self.loop
if getattr(_threadlocal, 'hub', None) is self:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment