code: def close(self):
          
          if self._S is not None:
              # after .close() self._event should never be called
              self._S.close()
              self._S = None
              self._Q.put_nowait(None)
docs: Begin closing subscription.