Skip to content

Use itertools.cycle in SequentialTaskSetΒ #2740

Closed
@bakhtos

Description

Prerequisites

Description

Currently, SequentialTaskSet.get_next_task uses an index and module operation to loop over the same list in a cycle

task = self.tasks[self._task_index % len(self.tasks)]

It should be easy to replace this with itertools.cycle, which is a built in memory-efficient iterator for creating cycles over iterables.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions