function createFauxWorker(config, onMessage) {
  const minion = createMinion(config.operation);
  let terminated = false;
  return {
    postMessage: function (data) {
      setTimeout(function () {
        if (terminated) {
          return;
        }
        onMessage({data: {buffer: minion(data), meta: data['meta']}});
      }, 0);
    },
    terminate: function () {
      terminated = true;
    },
  };
}
Create a faux worker for running operations.
@param {ProcessorOptions} config Configuration.
@param {function(FauxMessageEvent): void} onMessage Called with a message event.
@return {Object} The faux worker.