Put a new element in the queue.
164486
def push(self, el):
        
        count = next(self.counter)
        heapq.heappush(self._queue, (el, count))
993042
def insert_after(self, key, new_item, instance=0):
        """"""
        self._insert_item(key, new_item, instance, True)
520863
function (element) {
        if (element === null ||
            !element.tagName ||
            !element.childNodes) {
            throw {
                name: "StropheError",
                message: "Cannot queue non-DOMElement."
            };
        }

        this._data.push(element);
    }
88476
def insert(self):
        
        from google.appengine.api.taskqueue import Queue

        task = self.to_task()

        Queue(name=self.get_queue()).add(task)
1339017
def add(self, queue_name, transactional=False):
    """"""
    task = self.to_task()
    task.add(queue_name, transactional)
17514
function(element, check, go) {
      var shouldAdd = element.__queue && !element.__queue.check;
      if (shouldAdd) {
        queueForElement(element).push(element);
        element.__queue.check = check;
        element.__queue.go = go;
      }
      return (this.indexOf(element) !== 0);
    }
819818
private boolean add(T e, boolean failWhenFull) {
        final Queue<T> queue = this.getOrCreateQueue(e);

        this.writeLock.lock();
        try {
            if (this.size == this.capacity) {
                if (failWhenFull) {
                    throw new IllegalStateException("Queue is at capacity: " + this.capacity);
                }

                return false;
            }

            final boolean added = queue.add(e);
            if (added) {
                this.size++;
                this.notEmpty.signal();
            }
            return added;
        } finally {
            this.writeLock.unlock();
        }
    }
545699
def queue(self, *args, **kwargs):
        
        self.scraper.task_manager.put(self, args, kwargs)
        return self
602378
def additem(self, key, value):
        
        if key in self._position:
            raise KeyError('%s is already in the queue' % repr(key))
        self[key] = value
757708
def add(self, submission, archive, _):
        
        self.queue.put((submission, submission["result"], submission["grade"], submission["problems"], submission["tests"], submission["custom"], archive))
931480
def add_request(self, request):
        

        queue_item = QueueItem(request, Response(request.url))
        self.add(queue_item)
        return queue_item
275218
def put(self, prompt):
        
        for queue in self.downstream_inboxes.values():
            queue.put(prompt)
551095
def push(self, x):
        """"""
        assert x not in self.rank
        i = len(self.heap)
        self.heap.append(x)    # add a new leaf
        self.rank[x] = i
        self.up(i)
1227330
void fill(Queue<Object> queue, int count, Generator generator)
        {
            if (count == 1)
            {
                queue.add(generator.generate());
                return;
            }

            switch (this.generator.order)
            {
                case SORTED:
                    if (Comparable.class.isAssignableFrom(generator.clazz))
                    {
                        tosort.clear();
                        for (int i = 0 ; i < count ; i++)
                            tosort.add(generator.generate());
                        Collections.sort((List<Comparable>) (List<?>) tosort);
                        for (int i = 0 ; i < count ; i++)
                            if (i == 0 || ((Comparable) tosort.get(i - 1)).compareTo(i) < 0)
                                queue.add(tosort.get(i));
                        break;
                    }
                case ARBITRARY:
                    unique.clear();
                    for (int i = 0 ; i < count ; i++)
                    {
                        Object next = generator.generate();
                        if (unique.add(next))
                            queue.add(next);
                    }
                    break;
                case SHUFFLED:
                    unique.clear();
                    tosort.clear();
                    ThreadLocalRandom rand = ThreadLocalRandom.current();
                    for (int i = 0 ; i < count ; i++)
                    {
                        Object next = generator.generate();
                        if (unique.add(next))
                            tosort.add(next);
                    }
                    for (int i = 0 ; i < tosort.size() ; i++)
                    {
                        int index = rand.nextInt(i, tosort.size());
                        Object obj = tosort.get(index);
                        tosort.set(index, tosort.get(i));
                        queue.add(obj);
                    }
                    break;
                default:
                    throw new IllegalStateException();
            }
        }
478150
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            self._queue.push(session)
594431
def put(self, key, value, element):
        """"""
        self.neoindex[key][value] = element.neoelement
660903
def setPriority(self, queue, priority):
        '''
        
        '''
        q = self.queueindex[queue]
        self.queues[q[0]].removeSubQueue(q[1])
        newPriority = self.queues.setdefault(priority, CBQueue.MultiQueue(self, priority))
        q[0] = priority
        newPriority.addSubQueue(q[1])