getTaskExecutor function

TaskExecutor<TaskDescriptor> getTaskExecutor(
  1. TaskDescriptor task
)

Returns the relevant TaskExecutor based on the type of task.

Implementation

TaskExecutor getTaskExecutor(TaskDescriptor task) {
  if (task is AppTask) return AppTaskExecutor();
  if (task is FunctionTask) return FunctionTaskExecutor();
  return BackgroundTaskExecutor();
}