Skip to content

Task Manager

TaskManager()

TaskManager is a class that manages a queue of tasks. It is used by the Experiment class to manage the user-defined tasks."

abort()

Abort the current task.

add_task(task)

Add a task to the queue.

clear_tasks() async

Clear all tasks from the queue.

current_task()

Get the current task.

pause()

Pause the task manager.

register_task(experiment, task, **kwargs)

Registers a task with the experiment.

Parameters:

Name Type Description Default
task Task

The task to register.

required

remove_task(index) async

Remove a task from the queue.

resume()

Resume the task manager.

run(experiment) async

The main loop that runs the tasks in the queue.

setup() async

Setup the task manager.

shutdown() async

Shutdown the task manager.

teardown() async

Teardown the task manager.