- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
class Task:
def set_activity( activity_method ):
# проанализировать исходный код activity_method
# разделить цепочку команд на N частей
pass
def _get_parts_number():
return N
def _run_part( part_num ):
# выполнить часть part_num
pass
def run(tasks):
execution = True
part_num = 0
while execution:
execution = False
for task in tasks:
if part_num < task._get_parts_number():
task._run_part( part_num )
execution = True
part_num += 1