code: def stop(self):
          
          if self.__end.is_set():
              return
          self.__end.set()
          self.__send_retry_requests_timer.cancel()
          self.__threadpool.stop()
          self.__crud_threadpool.stop()
          self.__amqplink.stop()
          self.__network_retry_thread.join()
          # Clear out remaining pending requests
          with self.__requests:
              shutdown = LinkShutdownException('Client stopped')
              for req in self.__requests.values():
                  req.exception = shutdown
                  req._set()
                  self.__clear_references(req, remove_request=False)
              if self.__requests:
                  logger.warning('%d unfinished request(s) discarded', len(self.__requests))
              self.__requests.clear()
          #
          self.__network_retry_thread = None
          self.__network_retry_queue = None
          self.__container_params = None
docs: Stop the Client, disconnect from queue