def cancel_if_pending(self):
        if self.state == TDS_IDLE:
            return
        if not self.in_cancel:
            self._put_cancel()
        self.process_cancel()
Cancels current pending request.
dataset/ETHPy150Open denisenkom/pytds/pytds/tds.py/_TdsSession.cancel_if_pending