setOperation(operation, lib) {
    if (this.processor_) {
      this.processor_.dispose();
    }

    this.processor_ = new Processor({
      operation: operation,
      imageOps: this.operationType_ === 'image',
      queue: 1,
      lib: lib,
      threads: this.threads_,
    });
    this.changed();
  }
Set the operation.
@param {Operation} operation New operation.
@param {Object} [lib] Functions that will be available to operations run
    in a worker.
@api