This commit is contained in:
huangyuhui
2018-03-05 19:02:13 +08:00
parent 41d313baff
commit db08b61cfa
10 changed files with 104 additions and 36 deletions

View File

@@ -205,6 +205,13 @@ public abstract class Task {
return new TaskExecutor(this);
}
public final TaskExecutor executor(boolean start) {
TaskExecutor executor = new TaskExecutor(this);
if (start)
executor.start();
return executor;
}
public final TaskExecutor executor(TaskListener taskListener) {
TaskExecutor executor = new TaskExecutor(this);
executor.addTaskListener(taskListener);