whole_func_string: function cancelMain() {
      if (mainTask.isRunning && !mainTask.isCancelled) {
        mainTask.isCancelled = true
        next(TASK_CANCEL)
      }
    }
func_code_string: function cancelMain() {
      if (mainTask.isRunning && !mainTask.isCancelled) {
        mainTask.isCancelled = true
        next(TASK_CANCEL)
      }
    }
func_documentation_string: cancellation of the main task. We'll simply resume the Generator with a Cancel