Copies the current queue items.
423373
def copy(self):
        
        copy = self._queue.copy()

        result = list()
        while not copy.empty():
            result.append(copy.get_nowait())
        return result
576459
function() {

						var self = this, item;

						self.inWork = true;
						
						if (!self.queue.length) {
							return;
						}
						
						item = self.queue.shift();

						if (item.type == 'wait') {
							setTimeout(function(){
								self._process();
							}, item.duration*1000);
						} else {
							self.context = item.func.apply(self.context, item.args);
							self._process();
						}
						return self;
					}
958886
void refresh() {
    int pos = 0;
    for (final T item : backing) {
      if (pos < size()) {
        set(pos, item);
      } else {
        assert pos == size();
        add(pos, item);
      }
      pos++;
    }
    while (backing.size() < size()) {
      remove(size() - 1);
    }
    assert backing.size() == size();
    assert backing.equals(workingCopy);
  }
350946
def copy(self):
        """"""
        rv = object.__new__(self.__class__)
        rv.__dict__.update(self.__dict__)
        rv.identifiers = object.__new__(self.identifiers.__class__)
        rv.identifiers.__dict__.update(self.identifiers.__dict__)
        return rv
80969
def copy(self):
        
        return self.__class__(self, key=self._keyfn, precedes=self._precedes)
433009
def _flush_queue(self, q, ignore_priority=False):
        
        assert isinstance(q, PriorityQueue)

        current_timestamp = compute_release_time(lag_in_minutes=0)
        for _ in range(len(q)):
            entry = q.pop()
            assert isinstance(entry, PriorityEntry)

            if ignore_priority or entry.release_time < current_timestamp:
                self._resubmit_uow(entry.entry)
            else:
                q.put(entry)
                break
358807
def _sendQueued(self):
        """"""
        for tReq in list(self.requests.values()):  # must copy, may del
            if not tReq.sent:
                self._sendRequest(tReq)
1249342
def build_from_queue(cls, input_queue, replay_size, batch_size):
    
    return cls(
        lambda: input_queue.dequeue_many(batch_size),
        replay_size,
        batch_size=batch_size)
876638
function runQueue() {
    // Flag whether locker is busy (i.e. has current or pending processes)
    this.busy = (this.running || this.queue.length);

    // Run all items in queue until item requiring exclusive lock
    while (true) {
        var again = runNext.call(this);
		if (!again) return;
    }
}
616711
def purge_queues(queues=None):
    """"""
    current_queues.purge(queues=queues)
    click.secho(
        'Queues {} have been purged.'.format(
            queues or current_queues.queues.keys()),
        fg='green'
    )
1360780
def add(self, queue_item):
        

        hash_key = queue_item.get_hash()
        items = self.__get_var("items_" + queue_item.status)

        if hash_key in items.keys():
            return

        items[queue_item.get_hash()] = queue_item

        self.count_total += 1
1121782
public void copyChunk() {
    if (!isDone()) {
      try {
        this.rewriteResponse =
            runWithRetries(
                new Callable<RewriteResponse>() {
                  @Override
                  public RewriteResponse call() {
                    return storageRpc.continueRewrite(rewriteResponse);
                  }
                },
                serviceOptions.getRetrySettings(),
                StorageImpl.EXCEPTION_HANDLER,
                serviceOptions.getClock());
      } catch (RetryHelper.RetryHelperException e) {
        throw StorageException.translateAndThrow(e);
      }
    }
  }
658138
def reset_queues(queues):
    """"""
    for queue in queues:
        with queue.mutex:
            queue._put = queue._pebble_old_method
        delattr(queue, '_pebble_old_method')
        delattr(queue, '_pebble_lock')
784569
def copy(self):
        ""
        other = _ChainedHashAlgorithm(self._algorithms)
        other._hobj = deepcopy(self._hobj)
        other._fobj = deepcopy(self._fobj)
        return other
716117
public void copy(Priority priority)

   {

      if (priority == null)

         throw new IllegalArgumentException("priority required in Priority");

      

      this.primaryKey = priority.primaryKey;

      this.name = priority.name;

      

   }
1085975
def clone(self):
        
        result = AsyncBox(maxsize=self._maxsize, loop=self.loop)
        result._queue = self._queue
        result._can_read = self._can_read
        result._can_write = self._can_write

        return result
369500
def copy(self):
        """"""
        ret = self.__class__(self.callback, **self.__original_kwargs__)
        return self._ensure_assignment_on_copy(ret)