Built-in hook to find multiple textures from objects like AnimatedSprites.

@private
@param {PIXI.DisplayObject} item - Display object to check
@param {Array<*>} queue - Collection of items to upload
@return {boolean} if a PIXI.Texture object was found.
766885
function findMultipleBaseTextures(item, queue)
{
    let result = false;

    // Objects with multiple textures
    if (item && item._textures && item._textures.length)
    {
        for (let i = 0; i < item._textures.length; i++)
        {
            if (item._textures[i] instanceof Texture)
            {
                const baseTexture = item._textures[i].baseTexture;

                if (queue.indexOf(baseTexture) === -1)
                {
                    queue.push(baseTexture);
                    result = true;
                }
            }
        }
    }

    return result;
}
54033
function(storerecord, feedQueue) {
		var r = [],
			i = 0,
			l = 0,
			firstQueueitem = feedQueue[0];
		
		var filterFunc = function(elem) {
			if (storerecord === null) {
				return true;
			}
			return (elem.b >= storerecord.v);
		};
		
		for (i=0, l=feedQueue.length; i<l; i++) {
			if (
				(feedQueue[i].s != firstQueueitem.s) ||
				(feedQueue[i].k != firstQueueitem.k)
			) {
				return _filter(r,filterFunc);
			}
			r.push(feedQueue[i]);
		}
		return _filter(r,filterFunc);
	}
261525
function (src, data, handleImageTextureLoaded) {
    var hash = this.hash(data);
    var textureCache = this.textureCache;

    // Texture already being loaded or already loaded. Wait on promise.
    if (textureCache[hash]) {
      textureCache[hash].then(handleImageTextureLoaded);
      return;
    }

    // Texture not yet being loaded. Start loading it.
    textureCache[hash] = loadImageTexture(src, data);
    textureCache[hash].then(handleImageTextureLoaded);
  }
91432
function PriorityQueue(initialItems) {

  var self = this;
  MinHeap.call(this, function (a, b) {
    return self.priority(a) < self.priority(b) ? -1 : 1;
  });

  this._priority = {};

  initialItems = initialItems || {};
  Object.keys(initialItems).forEach(function (item) {
    self.insert(item, initialItems[item]);
  });
}
747110
public boolean store (T item) {
		if (size == items.length) {
			if (!resizable) return false;

			// Resize this queue
			resize(Math.max(8, (int)(items.length * 1.75f)));
		}
		size++;
		items[tail++] = item;
		if (tail == items.length) tail = 0;
		return true;
	}
702407
function (item) {
        if (this.state.held && this.state.dragged && this.state.dragged.item === item) {
          return this.state.draggedStyle;
        }
        return undefined;
      }
120478
function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
269287
function (data) {
            if (!ready) {
                return;
            }
            var i;
            if (data.all === true) {
                data.upto = numPages;
            }
            if (data.page) {
                this.queuePageToLoad(data.page - 1);
            } else if (data.upto) {
                for (i = 0; i < data.upto; ++i) {
                    this.queuePageToLoad(i);
                }
            }
        }
1143116
function spritesFilterBy(image) {
    if (RE_SPRITES_FILTER.test(image.originalUrl)) {
        return Promise.resolve();
    }
    return Promise.reject();
}
646672
function findItem( path, items ) {
  var result = null;
  items.forEach( function ( item ) {
    if (!result && item instanceof MenuItem && item.paths.filter( function( value ) {
        return value === path;
      } ).length > 0)
      result = item;
    if (!result && item instanceof MenuNode) {
      var child = findItem( path, item.children );
      if (child)
        result = child;
    }
  } );
  return result;
}
1200681
function(item, callback) {
                if (item.uniqueId != '') {
                    if (hasCache && typeof queueDb == 'object') {
                        queueDb.waitQ
                            .put({
                                threadId: parseInt(item.subjectId),
                                uniqueId: item.uniqueId,
                                owner: parseInt(userInfo.id),
                                message: Utility.crypt(item, cacheSecret)
                            })
                            .then(function() {
                                callback && callback();
                            })
                            .catch(function(error) {
                                fireEvent('error', {
                                    code: error.code,
                                    message: error.message,
                                    error: error
                                });
                            });
                    }
                    else {
                        chatWaitQueue.push(item);
                        callback && callback();
                    }
                }
            }
1056554
public boolean offer(ObjectContainer<T> item)
  {
    final long itemLength = item.getSize();

    if (currentMemory.addAndGet(itemLength) <= memoryBound) {
      if (queue.offer(item)) {
        return true;
      }
    }
    currentMemory.addAndGet(-itemLength);
    return false;
  }
151786
function(object, customizer) {

    var foundStack = [], //Stack to keep track of discovered objects
        queueOfModifiers = [], //Necessary to change our JSON as we take elements from the queue (BFS algorithm)
        queue = []; //queue of JSON elements, following the BFS algorithm

    //We instantiate our result root.
    var result = _.isArray(object) ? [] : {};

    //We first put all the JSON source in our queues
    queue.push(object);
    queueOfModifiers.push(new ObjectEditor(object, ""));

    var positionStack;
    var nextInsertion;

    //BFS algorithm
    while(queue.length > 0) {

        //JSON to be modified and its editor
        var value = queue.shift();
        var editor = queueOfModifiers.shift();
        //The path that leads to this JSON, so we can build other paths from it
        var path = editor.path;

        //We first attempt to make any personalized replacements
        //If customizer doesn't affect the value, customizer(value) returns undefined and we jump this if
        if(customizer !== undefined) {

            //By using this variable, customizer(value) is called only once.
            var customizedValue = customizer(value);

            if(customizedValue !== undefined) value = customizedValue;
        }


        if(typeof value === "object") {

            positionStack = _.chain(foundStack)
                .map("value")
                .indexOf(value)
                .value();

            //If the value has already been discovered, we only fix its circular reference
            if(positionStack !== -1) {
                nextInsertion = foundStack[positionStack].makePathName();
            }
            else {
                //At the first time we discover a certain value, we put it in the stack
                foundStack.push(new FoundObject(value, path));

                nextInsertion = value;

                for(var component in value) {
                    if(_.has(value, component)) {
                        queue.push(value[component]);
                        var newPath = path + "[" + component + "]";
                        queueOfModifiers.push(new ObjectEditor(result, newPath));
                    }
                }
            }
        }
        //If it's an elementary value, it can't be circular, so we just put this value in our JSON result.
        else {
            nextInsertion = value;
        }

        editor.editObject(nextInsertion);
    }

    return result;
}
496974
public final boolean offer(Queue<E> queue, E item) throws ConcurrentConveyorException {
        if (queue.offer(item)) {
            return true;
        } else {
            checkDrainerGone();
            unparkDrainer();
            return false;
        }
    }
492233
function dequeue(queue, item) {
    queue[SIZE] -= 1

    let done = false
    item.action(() => {
        if (done) {
            return
        }
        done = true

        if (item.next) {
            dequeue(queue, item.next)
        }
        else {
            assert(queue[TAIL] === item, "BROKEN")
            queue[TAIL] = null
        }
    })
}
1338573
function Item(item) {
  if (!item) item = {};

  utils.syncContents(this, item.contents || item.content);
  this.cache = item.cache || {};
  this.options = item.options || {};
  this.locals = item.locals || {};
  this.data = item.data || {};

  this.define('contents', {
    configurable: true,
    enumerable: false,
    set: function(val) {
      utils.syncContents(this, val);
    },
    get: function() {
      return this._contents;
    }
  });

  var base = item.base;
  delete item.base;

  Vinyl.call(this, item);
  Base.call(this, item);
  delete this.base;
  this.base = base;

  for (var key in item) {
    var val = item[key];
    if (key === 'stat' && utils.isObject(val) && val.mode) {
      this.set(key, utils.cloneStats(val));
    } else if (val) {
      this.set(key, val);
    }
  }

  this.is('Item');
  this.use(utils.option());
  this.use(utils.plugin());
}
362801
function (queueId) {
                var id = queueId;
                if (queueId == null) {
                    id = this.DEFAULT_QUEUE_KEY;
                }
                var queue = this.queues[id];
                if (queue && queue.list.length > 0) {
                    var curAnimInfo = queue.list.shift();
                    for (var i = 1, l = queue.list.length; i < l; i++) {
                        var animInfo = queue.list[i];
                        delete this.animations[animInfo.animId];
                    }
                    this.skipAnimation(curAnimInfo.animId);
                    delete this.queues[id];
                    return true;
                }
                return false;
            }