Task interfaces

Interfaces used for task execution.

class TaskExecutor

Executor for tasks.

Implemented by:

  • concurrent.futures.Executor
submit(task_fn, *args, *kwargs)

Schedules a task.

Parameters:
  • task_fn (executor_task_fn) – Task function to be executed.
  • args – Optional positional arguments.
  • kwargs – Optional keyword arguments.
Return type:

TaskFuture

Returns:

The future object associated to the scheduled task.

class TaskFuture

Future object associated to a task.

Implemented by:

  • concurrent.futures.Future
result(timeout)
executor_task_fn(*args, **kwargs)
Parameters:
  • args – Optional positional arguments.
  • kwargs – Optional keyword arguments.