class TaskScheduer {

    public void schedule(final IErrorHandler iErrorHandler, long timeout, ITimeoutHandler iTimeoutHandler, final ITasksFinishCallback iTasksFinishCallback) {
        final AtomicInteger taskDoneCounter = new AtomicInteger(0);
        final int taskCount = mTasks.size();
        for (final LaunchTask task : mTasks) {
            task.runOn().execute(new Worker(iErrorHandler, task, mTasks, new Worker.TaskDoneCallback() {
                @Override
                public void onTaskDone() {
                    if (taskDoneCounter.addAndGet(1) == taskCount && iTasksFinishCallback != null) {
                        iTasksFinishCallback.onTasksFinished();
                    }
                }
            }));
        }
        TaskDelayChecker.delayCheckTaskAlive(mTasks, timeout, iTimeoutHandler);
    }

    public  TaskScheduer(List<LaunchTask> originTasks);

}