cleanup = function(err) {
      me.terminated = true;
      me.cleaning = false;

      if (me.worker != null && me.worker.removeAllListeners) {
        // removeAllListeners is only available for child_process
        me.worker.removeAllListeners('message');
      }
      me.worker = null;
      me.terminating = false;
      if (me.terminationHandler) {
        me.terminationHandler(err, me);
      } else if (err) {
        throw err;
      }
    }
Terminate the worker.
@param {boolean} [force=false]   If false (default), the worker is terminated
                                 after finishing all tasks currently in
                                 progress. If true, the worker will be
                                 terminated immediately.
@param {function} [callback=null] If provided, will be called when process terminates.