Queues the callback
356591
function queue(args) {
    args.push(resultsCallback);
    stack.push({caller: this.caller, args: args});
  }
1182275
protected void done() {
        try {
            page.getEventQueue().queue(event);
        } catch (Exception e) {
            log.error(e);
        }
    }
1163493
function processQueue() {
        var queue = nextTick.queue;
        var digest = nextTick.digest;

        nextTick.queue = [];
        nextTick.timeout = null;
        nextTick.digest = false;

        queue.forEach(function(queueItem) {
          var skip = queueItem.scope && queueItem.scope.$$destroyed;
          if (!skip) {
            queueItem.callback();
          }
        });

        if (digest) $rootScope.$digest();
      }
1320572
function done() {
        var arg = errors.length ? errors : null
        --pending || process.nextTick(callback, arg)
    }
362127
function(callee, input) {
		for (var i = 0, len = this._queue.length; i < len; ++i)
			input = this._queue[i].call(callee, input);
		return input;
	}
410294
function runQueue(){
			if( urllist.length ){
				AI.makeReq( o.proxy + urllist.join( "," ), elQueue );
				elQueue = $();
				urllist = [];
			}
		}
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;
    }
}
464763
function () {
            var fc = this.freeCount, def, defQueue = this.__deferredQueue;
            while (fc-- >= 0 && defQueue.count) {
                def = defQueue.dequeue();
                var conn = this.getObject();
                if (conn) {
                    def.callback(conn);
                } else {
                    throw new Error("UNEXPECTED ERROR");
                }
                fc--;
            }
        }
491190
function(source, callback) {
        callback = callback || noop;

        //if there's a queue
        if (queue[source] instanceof Array) {
            //just call the callback
            return callback();
        }

        //otherwise there is not a queue
        //so let's create one
        queue[source] = [];

        var style     = document.createElement('link');
        var head     = document.getElementsByTagName('head')[0];

        style.type = 'text/css';
        style.rel = 'stylesheet';
        style.href = source;

        head.appendChild(style);
        callback();
    }
861859
def iterqueue(queue, expected):
    """"""
    while expected > 0:
        for item in iter(queue.get, EXIT):
            yield item
        expected -= 1
595370
function() {
			try {
				if (fn) {
					/**
					 * Insert a done() or ok() argument to other needed arguments
					 */
					syntheticArgs.unshift(function() {
						/**
						 * Call the next in queue
						 */
						$this.next.apply($this, arguments);
					});
					/**
					 * Call the function finally
					 */
					fn.apply(this, syntheticArgs);
				} else {
					syntheticArgs = syntheticArgs || [];
					/**
					 * If no function passed, call the next in queue
					 */
					$this.next.apply(this, syntheticArgs);
				}
			} catch(e) {
				/**
				 * An error caught is thrown directly to the catch handler, if any
				 */
				if (this.onCatch) {
					this.onCatch(e);
				} else {
					throw e;
				}
			}
		}
466704
function done () {
    that.fetchQueue.stopFetching(key, arguments);
    that.store(key, arguments, callback);
  }
476310
function Queue(options) {
  var self = this;

  typeforce({
    path: 'String',
    process: 'Function',
    throttle: 'Number',
    leveldown: 'Function'
  }, options);

  EventEmitter.call(this);

  this._options = extend(true, {}, options);
  this._process = options.process;
  this._throttle = options.throttle;
  this._strikes = ('strikes' in options) ? options.strikes : false;
  this._blockOnFail = options.blockOnFail;

  this._q = [];
  this._db = levelQuery(levelup(options.path, {
    db: options.leveldown,
    valueEncoding: 'json'
  }));

  this._db.query.use(jsonQueryEngine());

  indices.forEach(function(i) {
    self._db.ensureIndex(i);
  });

  this._deleting = {};
  promisifyDB(this._db);
  promisifyDB(this._db, 'query', { type: 'readable' })

  this._setupCount();
  this._load()
    .then(function() {
      if (options.autostart) self.start();
    });
}
658476
function enqueue(){
		var tasks = argumentFilter(arguments);
		queued.push({ tasks:tasks });
		// Timeout needed to increment expected, if next item exists.
		// If it run without timeout, expected always be 0 and the functions
		// will be executed immediately obtaining undefined as parameter.
		setTimeout(function(){if (! expected) runQueue();},1);
		return enqueue;
	}
545699
def queue(self, *args, **kwargs):
        
        self.scraper.task_manager.put(self, args, kwargs)
        return self
300610
function() {
        var queue = this._queue;
        var globalOptions = this.globalOptions;
        var options = this.options;
        var before = options && options.before;
        var after = options && options.after;
        var onError = globalOptions.onError || (globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod]);
        var target, method, args, stack, i, l = queue.length;

        this.targetQueues = Object.create(null);

        if (l && before) { before(); }
        for (i = 0; i < l; i += 4) {
          target = queue[i];
          method = queue[i+1];
          args   = queue[i+2];
          stack  = queue[i+3]; // Debugging assistance

          // TODO: error handling
          if (args && args.length > 0) {
            if (onError) {
              try {
                method.apply(target, args);
              } catch (e) {
                onError(e);
              }
            } else {
              method.apply(target, args);
            }
          } else {
            if (onError) {
              try {
                method.call(target);
              } catch(e) {
                onError(e);
              }
            } else {
              method.call(target);
            }
          }
        }
        if (l && after) { after(); }

        // check if new items have been added
        if (queue.length > l) {
          this._queue = queue.slice(l);
          this.flush();
        } else {
          this._queue.length = 0;
        }
      }
700620
protected void processQueue() {
        try {
            QueueItem item = queue.take();
            client.addMultipleCounterDataPoints(item.tenantId, item.data);
        } catch (InterruptedException e) {
            // TODO better logging of this unlikely error
            e.printStackTrace();
            return;
        }
    }