code: def kill(self):
          
          # greenlet has a magic attribute ``dead`` - pylint: disable=E1101
          if self._gt is not None and not self._gt.dead:
              # we can't just kill the thread because we have to give
              # ConsumerMixin a chance to close the sockets properly.
              self._providers = set()
              self._pending_remove_providers = {}
              self.should_stop = True
              try:
                  self._gt.wait()
              except Exception as exc:
                  # discard the exception since we're already being killed
                  _log.warn(
                      'QueueConsumer %s raised `%s` during kill', self, exc)
  
              super(QueueConsumer, self).kill()
              _log.debug('killed %s', self)
docs: Kill the queue-consumer.
  
          Unlike `stop()` any pending message ack or requeue-requests,
          requests to remove providers, etc are lost and the consume thread is
          asked to terminate as soon as possible.