towhee.engine.task_scheduler.BasicScheduler¶
- class towhee.engine.task_scheduler.BasicScheduler(task_execs: List[ThreadPoolTaskExecutor], threshold: int)[source]¶
Bases:
TaskScheduler
Basic scheduler.
This scheduler will start all ops, and has no scheduling logic, so the schedule_step does nothing.
Methods
join
Register a virtual subclass of an ABC.
Runs the a single schedule step in a loop.
Scheduler:
stop
- __init__(task_execs: List[ThreadPoolTaskExecutor], threshold: int)[source]¶
- register(graph_ctx)[source]¶
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
- schedule_forever(sleep_ms)¶
Runs the a single schedule step in a loop.
- sleep_ms: (int)
Milliseconds to sleep after completing a single scheduling step.