code: function onError(error) {
      me.terminated = true;
      if (me.terminating && me.terminationHandler) {
        me.terminationHandler(me);
      }
      me.terminating = false;
  
      for (var id in me.processing) {
        if (me.processing[id] !== undefined) {
          me.processing[id].resolver.reject(error);
        }
      }
      me.processing = Object.create(null);
    }
docs: reject all running tasks on worker error