hub.py: replace self._threadpool.close() with self._threadpool.kill(), add unit test.