code: def cancel(self):
          
          self._cancelled.set()
          if not self._dead:
              self._ready_sem.acquire()
              self._ready_sem.release()
docs: Stop the timer without executing the callback.