Pop a single callback.
544762
def pop_callback(obj):
    """"""
    callbacks = obj._callbacks
    if not callbacks:
        return
    if isinstance(callbacks, Node):
        node = callbacks
        obj._callbacks = None
    else:
        node = callbacks.first
        callbacks.remove(node)
        if not callbacks:
            obj._callbacks = None
    return node.data, node.extra
867854
def unregister_callback(callback_id):
    """"""
    global _callbacks
    obj = _callbacks.pop(callback_id, None)
    threads = []
    if obj is not None:
        t, quit = obj
        quit.set()
        threads.append(t)
    for t in threads:
        t.join()
889846
function pop(obj, key, default_value, pred) { var result
        result = get(obj, key, default_value, pred)
        delete obj[key]
        return result
    }
443138
def pop_event(self):
        """"""
        if len(self.event_list) > 0:
            evt = self.event_list.pop(0)
            return evt
        return None
1024947
function () {
    const result = Array.prototype.pop.apply(arr)

    fn('pop', arr, {
      value: result
    })

    return result
  }
824424
def pop(self, arg=None):
        """"""
        self._stable = False
        if arg is None:
            arg = len(self.childs) - 1
        if isinstance(arg, int):
            try:
                result = self.childs.pop(arg)
            except IndexError:
                raise DOMModByIndexError(self, "Given index invalid.")
            if isinstance(result, DOMElement):
                result.parent = None
        else:
            result = []
            if isinstance(arg, str):
                arg = [arg]
            for x in arg:
                try:
                    result.append(getattr(self, x))
                except AttributeError:
                    raise DOMModByKeyError(
                        self, "Given search key invalid. No child found."
                    )
            if result:
                for x in result:
                    self.childs.remove(x)
                    if isinstance(x, DOMElement):
                        x.parent = False
        return result
1321474
def pop_context(self):
        """"""
        processor = getattr(self, 'processor', None)
        if processor is not None:
            pop_context = getattr(processor, 'pop_context', None)
            if pop_context is None:
                pop_context = getattr(processor, 'pop', None)
            if pop_context is not None:
                return pop_context()
        if self._pop_next:
            self._pop_next = False
563126
def remove_callback(self, callback):
        """"""
        if callback in self.callbacks:
            self.callbacks.remove(callback)
564438
def _run_callbacks(self):
        """"""
        for i in range(len(self._callbacks)):
            callback, args = self._callbacks.popleft()
            try:
                callback(*args)
            except Exception:
                self._log.exception('Ignoring exception in callback:')
48996
def _handle(self, event_handler, event_name, user_args, event_timeout,
                cond, cond_timeout):
        
        if cond:
            cond.wait(cond_timeout)
        event = self.pop_event(event_name, event_timeout)
        return event_handler(event, *user_args)
961873
private void popScope(boolean quietly) {
    if (!quietly && scopeCallback != null) {
      scopeCallback.exitScope(this);
    }
    Node scopeRoot;
    int roots = scopeRoots.size();
    if (roots > 0) {
      scopeRoot = scopeRoots.remove(roots - 1);
    } else {
      scopeRoot = scopes.pop().getRootNode();
    }
    if (NodeUtil.isValidCfgRoot(scopeRoot)) {
      cfgs.pop();
    }
  }
375075
def pop_all(self):
        """"""
        new_stack = type(self)()
        new_stack._exit_callbacks = self._exit_callbacks
        self._exit_callbacks = deque()
        return new_stack
1197592
function(name, callback, context) {
      if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
      var self = this;
      var once = _.once(function() {
        self.off(name, once);
        callback.apply(this, arguments);
      });
      once._callback = callback;
      return this.on(name, once, context);
    }
1227708
def pop (self, key):
        """"""
        if key in self._keys:
            self._keys.remove(key)
        super(ListDict, self).pop(key)
1044611
def make_call_with_cb(self, fun, *args):
        """"""

        cid, event = self.handler.register_callback()
        argscp = list(args)
        argscp.append(cid)
        self.make_call(fun, *argscp)
        return event
1322241
def off(self, event):
        ''
        try:
            self._once_events.remove(event)
        except KeyError:
            pass
        self._callback_by_event.pop(event, None)
1321388
def rpop(self, key, *, encoding=_NOTSET):
        """"""
        return self.execute(b'RPOP', key, encoding=encoding)