def _request_pop(self, name, data):

        self.commands_lock.acquire()
        rqb = self.tagged_commands.pop(name)
        if not self.tagged_commands:
            need_event = True
        else:
            need_event = False
        self.commands_lock.release()

        if __debug__: self._log(4, '_request_pop(%s, %r) [%d] = %s' % (name, data, len(self.tagged_commands), rqb.tag))
        rqb.deliver(data)

        if need_event:
            if __debug__: self._log(3, 'state_change_free.set')
            self.state_change_free.set()
dataset/ETHPy150Open OfflineIMAP/imapfw/imapfw/imap/imaplib3/imaplib2.py/IMAP4._request_pop/original