def close(self, timeout=10):
    'Close the connections and network event loop.'
    self.network_event_loop.call_soon_threadsafe(self.network_event_loop.stop)
    wait_until((lambda : (not self.network_event_loop.is_running())), timeout=timeout)
    self.network_event_loop.close()
    self.join(timeout)
Close the connections and network event loop.
def close(self, timeout=10):
    
    self.network_event_loop.call_soon_threadsafe(self.network_event_loop.stop)
    wait_until((lambda : (not self.network_event_loop.is_running())), timeout=timeout)
    self.network_event_loop.close()
    self.join(timeout)