function Packer(numWorkers, options) {
    this._options = 0;
    this._processor = null;
    this._layoutQueue = [];
    this._layouts = {};
    this._layoutCallbacks = {};
    this._layoutWorkers = {};
    this._layoutWorkerData = {};
    this._workers = [];
    this._onWorkerMessage = this._onWorkerMessage.bind(this);

    // Set initial options.
    this.setOptions(options);

    // Init the worker(s) or the processor if workers can't be used.
    numWorkers = typeof numWorkers === 'number' ? Math.max(0, numWorkers) : 0;
    if (numWorkers && isWorkerProcessorsSupported()) {
      try {
        this._workers = createWorkerProcessors(numWorkers, this._onWorkerMessage);
      } catch (e) {
        this._processor = new PackerProcessor();
      }
    } else {
      this._processor = new PackerProcessor();
    }
  }
@class
@param {Number} [numWorkers=0]
@param {Object} [options]
@param {Boolean} [options.fillGaps=false]
@param {Boolean} [options.horizontal=false]
@param {Boolean} [options.alignRight=false]
@param {Boolean} [options.alignBottom=false]
@param {Boolean} [options.rounding=false]