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): ...@@ -418,8 +418,12 @@ class Hub(greenlet):
def destroy(self): def destroy(self):
global _threadlocal global _threadlocal
result = self.join() if self._resolver is not None:
assert result is True, result self._resolver.close()
del self._resolver
if self._threadpool is not None:
self._threadpool.close()
del self._threadpool
self.loop.destroy() self.loop.destroy()
del self.loop del self.loop
if getattr(_threadlocal, 'hub', None) is self: 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