beatmup.CustomPipeline

class beatmup.CustomPipeline

Custom pipeline: a sequence of tasks to be executed as a whole. Acts as an AbstractTask. Built by adding tasks one by one and calling measure() at the end.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

add_task(self, task)

Adds a new task to the end of the pipeline

get_task(self, index)

Retrieves a task by its index

get_task_count(self)

Returns number of tasks in the pipeline

get_task_index(self, holder)

Retrieves task index if it is in the pipeline; returns -1 otherwise

insert_task(self, task, before)

Inserts a task in a specified position of the pipeline before another task

measure(self)

Determines pipeline execution mode and required thread count

remove_task(self, task)

Removes a task from the pipeline, if any.