code: def abort_io(self, iocb, err):
          
          if _debug: IOController._debug("abort_io %r %r", iocb, err)
  
          # if it completed, leave it alone
          if iocb.ioState == COMPLETED:
              pass
  
          # if it already aborted, leave it alone
          elif iocb.ioState == ABORTED:
              pass
  
          else:
              # change the state
              iocb.ioState = ABORTED
              iocb.ioError = err
  
              # notify the client
              iocb.trigger()
docs: Called by a handler or a client to abort a transaction.