tells libdbus you no longer care about the pending incoming message.
171870
def cancel(self) :
        ""
        dbus.dbus_pending_call_cancel(self._dbobj)
        if self._awaiting != None :
            # This probably shouldn’t occur. Looking at the source of libdbus,
            # it doesn’t keep track of any “cancelled” state for the PendingCall,
            # it just detaches it from any notifications about an incoming reply.
            self._awaiting.cancel()
833382
def stop(self, message):
        
        self._stop = time.clock()
        VSGLogger.info("{0:<20} - Finished [{1}s]".format(message, self.pprint(self._stop - self._start)))
382256
def stop_db_session(exc=None):
    """"""
    # print('==> Stop session', type(exc))

    if has_db_session():
        exc_type = None
        tb = None

        if exc:
            exc_type, exc, tb = get_exc_info(exc)

        db_session.__exit__(exc_type, exc, tb)
1264420
def cancelPendingResultsFor( self, ps ):
        """"""
        k = self._parametersAsIndex(ps)

        if k in self._results.keys():
            # remove from results
            rs = self._results[k]
            js = [ j for j in rs if not isinstance(j, dict) ]
            self._results[k] = [ rc for rc in rs if isinstance(rc, dict) ]

            # ...and from pending jobs list
            for j in js:
                del self._pending[j]
1042283
def stop_notifying(cls, user_or_email, instance):
        """"""
        super(InstanceEvent, cls).stop_notifying(user_or_email,
                                                 object_id=instance.pk)
842777
def clear_notify(self, messages):
        
        newpile = self._notificationbar.widget_list
        for l in messages:
            if l in newpile:
                newpile.remove(l)
        if newpile:
            self._notificationbar = urwid.Pile(newpile)
        else:
            self._notificationbar = None
        self.update()
260991
async def clear(self):
        """"""
        with (await self._cond):
            while self._free:
                conn = self._free.popleft()
                await conn.close()
            self._cond.notify()
338019
def remove_send_message(self, connection):
        
        if connection in self._send_message:
            del self._send_message[connection]
            LOGGER.debug("Removed send_message function "
                         "for connection %s", connection)
        else:
            LOGGER.warning("Attempted to remove send_message "
                           "function for connection %s, but no "
                           "send_message function was registered",
                           connection)
494950
def reject(self, reason):
        """"""
        if self._state != 'pending':
            raise RuntimeError('Promise is no longer pending.')

        self.reason = reason
        self._state = 'rejected'
        errbacks = self._errbacks
        self._errbacks = None
        for errback in errbacks:
            errback(reason)
918294
def _cancel(self, msgId):
        
        _, canceller = self._requests.pop(msgId, (None, None))

        if canceller is not None and canceller.active():
            canceller.cancel()
257996
def close_db(fn):
    """"""
    @wraps(fn)
    def inner(*args, **kwargs):
        try:
            return fn(*args, **kwargs)
        finally:
            if not HUEY.immediate:
                close_old_connections()
    return inner
1010413
def discard_incoming_messages(self):
        
        # Flush any received message so far.
        self.inbox.clear()

        # This allows nesting of discard_incoming_messages() calls.
        previous = self._discard_incoming_messages
        self._discard_incoming_messages = True

        try:
            yield
        finally:
            self._discard_incoming_messages = previous
834609
def DropConnection(self, connection):
    """"""
    try:
      connection.cursor.close()
    except MySQLdb.Error:
      pass

    try:
      connection.dbh.close()
    except MySQLdb.Error:
      pass
748647
def clean(self):
        
        # Note that we do not close the connection here -- somebody
        # may still be reading from it.
        while len(self.queue) > 0 and self._pair_stale(self.queue[0]):
            self.queue.pop(0)
1112531
def cancel(self):
        
        if not self.__submitted:
            # XXX: Workaround for a bug reported on libusb 1.0.8: calling
            # libusb_cancel_transfer on a non-submitted transfer might
            # trigger a segfault.
            raise self.__USBErrorNotFound
        self.__mayRaiseUSBError(self.__libusb_cancel_transfer(self.__transfer))
12847
def stop(self):
        """"""
        if not self.stopped:
            self.stopped = True
            if self.pendingHeartbeat is not None:
                self.pendingHeartbeat.cancel()
                self.pendingHeartbeat = None
1162867
def cancelUpdate(self):
        
        key = '/library/sections/%s/refresh' % self.key
        self._server.query(key, method=self._server._session.delete)